Retrieving a configuration setting in code

The Milos Data Objects read their settings from the app.config and web.config files by default. There is usually no reason to retrieve them yourself, but what if you want to save your own setting in the .config file and retrieve it in code?

namespace: EPS.Configuration

string result = ConfigurationSettings.Sources["DotNetConfigurationFile"].Settings["MySetting"];

or (since the default configuration source in Milos is the app.config or web.config file)
string result = ConfigurationSettings.Settings["MySetting"];

See the "How-To" help document for advanced configuration topics such as:




Last Updated: 7/31/2006