On some occasions we need to store values in app.config file confirguracion from our own application at runtime.
Without giving a lot of thought I will show one of the methods that I used to do, and is as follows:
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["Test"].Value = "valueTest";
config.Save(ConfigurationSaveMode.Modified);
0 comentarios:
Post a Comment