12345678910111213141516171819202122232425262728293031 |
- using System.Configuration;
- namespace FCS.Common
- {
-
-
-
- public static class ConfigHelper
- {
-
-
-
-
-
-
-
- public static T GetConfigValue<T>(string key)
- {
- try
- {
- object o = ConfigurationManager.AppSettings[key];
- if (o != null)
- {
- return CommonHelper.ChangeType<T>(o);
- }
- }
- catch { }
- return default(T);
- }
- }
- }
|