Skip to content

Instantly share code, notes, and snippets.

@maxfridbe
Created November 1, 2012 22:56
Show Gist options
  • Save maxfridbe/3997285 to your computer and use it in GitHub Desktop.
Save maxfridbe/3997285 to your computer and use it in GitHub Desktop.
Modify Running App Config
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Remove("CurrentUICulture");
config.AppSettings.Settings.Add("CurrentUICulture", name);
config.Save(ConfigurationSaveMode.Modified, true);
// Force a reload of a changed section.
ConfigurationManager.RefreshSection("appSettings");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment