How to get app.config value at .net framework 2.0?
-
using System.Configuration;
static void ShowConfig()
{ // For read access you do not need to call the OpenExeConfiguraton foreach (string key in ConfigurationManager.AppSettings) { string value = ConfigurationManager.AppSettings\[key\]; Console.WriteLine("Key: {0}, Value: {1}", key, value); } }
get an error The name'ConfigurationManager' does not exist in the current context. Can anyone help?
-
using System.Configuration;
static void ShowConfig()
{ // For read access you do not need to call the OpenExeConfiguraton foreach (string key in ConfigurationManager.AppSettings) { string value = ConfigurationManager.AppSettings\[key\]; Console.WriteLine("Key: {0}, Value: {1}", key, value); } }
get an error The name'ConfigurationManager' does not exist in the current context. Can anyone help?
You need to add reference to System.Configuration
Giorgi Dalakishvili #region signature my articles My blog[^] #endregion
-
You need to add reference to System.Configuration
Giorgi Dalakishvili #region signature my articles My blog[^] #endregion
Another error :Configuration system failed to initialize. Please help.
-
Another error :Configuration system failed to initialize. Please help.
Perhaps the file is malformed.
Giorgi Dalakishvili #region signature my articles My blog[^] #endregion