Skip to content

Instantly share code, notes, and snippets.

@hjerpbakk
Created July 22, 2012 17:36
Show Gist options
  • Save hjerpbakk/3160414 to your computer and use it in GitHub Desktop.
Save hjerpbakk/3160414 to your computer and use it in GitHub Desktop.
Save config before
var ConfigurationFileMap = new ExeConfigurationFileMap() { ExeConfigFilename = "My.config" };
var config = ConfigurationManager.OpenMappedExeConfiguration(ConfigurationFileMap, ConfigurationUserLevel.None);
if (config != null)
{
// do stuff
config.Save();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment