A
Alberto
I need to modify a value in the app.config file with this code:
System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
string key = "Path";
string value = "New value";
config.AppSettings.Settings.Add(key, value);
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
It doesn't write the file. Could you tell me how to do it?
Thank you
System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
string key = "Path";
string value = "New value";
config.AppSettings.Settings.Add(key, value);
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
It doesn't write the file. Could you tell me how to do it?
Thank you