Hi,
I need to parse a config file that is situated in another project. I know that ConfigurationManager reads the app.config file by default (right?) how to make it read that particular config file?
Thank you
Hi,
I need to parse a config file that is situated in another project. I know that ConfigurationManager reads the app.config file by default (right?) how to make it read that particular config file?
Thank you
// Create a filemap refering the config file.
ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();
fileMap.ExeConfigFilename = configFilePath;
// Retrieve the config file.
Configuration configuration = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);