Using system; using system.configuration;
Namespace openhack4 {/// /// Web.config Operation class /// summary> public seled class confighelper {/// // gets the configuration string information in AppSettings /// < / summary> /// param> /// returns> public static string getconfig (string key) {return configurationSettings.appsettings [key];}
/// // gets configuration BOOL value information in AppsetTINGS /// summary> /// param> /// returns> public Static Bool getConfigBool (String Key) {BOOL RESULT = false; string cfgval = getconfig (key); if (null! = cfgval&& string.empty! = cfgval) {Try {result = BOOL.PARSE (CFGVAL);} catch Formatexception) {// ignore format exceptions.}
Return result;}}}