Sea Sharp

Sea Sharp

  • NA
  • 3
  • 0

Writing to App.Config in c# 2.0

Jun 21 2007 2:00 PM
Hi,

Environment = VS 2005, c# 2.0

I have a problem using the System.Configuration Namespace.I am not getting the ConfigurationManager class to use in the following code though I have imported the
System.Configuration namespace.

System.Configuration.Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Add("NewKey", "New Value");
config.Save();


Thanks




Answers (2)