TO_REMEMBER: Como escribir propiedades (keys appsettings) en c#

January 22, 08 by Tomcask

Como sabéis este es mi repositorio de cosas para que yo me he acuerde.

Pues eso, Como escribir en las keys de appsettings con una aplicación .net en c#

Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Remove(”nombrePropiedad”);
config.AppSettings.Settings.Add(”nombrePropiedad”, “nuevoValor”);
// Save the configuration file.
config.Save(ConfigurationSaveMode.Full);
// Force a reload of the changed section.
ConfigurationManager.RefreshSection(”appSettings”);

Ale deu…




This entry no have comments... but you can be first.

Leave a Reply