Created
August 21, 2017 23:52
-
-
Save PaulNichols/1f91adffa95645854dcb1e247055cf0d to your computer and use it in GitHub Desktop.
updated a config file appsetting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Configuration GetAppConfigFile() | |
{ | |
string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); | |
string configFile = System.IO.Path.Combine(appPath, System.AppDomain.CurrentDomain.FriendlyName + ".config"); | |
ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap() | |
{ | |
ExeConfigFilename = configFile | |
}; | |
return ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment