See here .
Put this in your App.config :
<appSettings file="accessLevel.config"/>
And another file called accessLevel.config:
<?xml version="1.0" encoding="utf-8" ?> <appSettings> <add key="TestSetting" value="TestValue"/> </appSettings>
And then you can access your configuration values ββin code as follows:
string value = ConfigurationManager.AppSettings["TestSetting"];
Make sure accessLevel.config is set to copy to the output directory (right-click the file in Visual Studio -> Properties -> Copy to output directory -> Copy if new).
Michael
source share