I have loaded the default App.config
file in my solution and I'm able to access stored variables from it.
XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="foo" value="bar"/>
</appSettings>
</configuration>
C#
Configuration configManager = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
KeyValueConfigurationCollection config = configManager.AppSettings.Settings;
string foo = config["foo"].Value;
Now I have created another configuration file to store variables for another part of my solution, but I can't figure out how to load it the same way with ConfigurationManager.
Configuration config2 = ConfigurationManager.OpenExeConfiguration("path/to/config.config");