- Lots of configuration things can potentially change, and command line arguments are out of the question.
// in the code
string mykey = System.Configuration.ConfigurationSettings.AppSettings ["Key1"];
<?xml version="1.0" encoding="utf-8" ?>
<add key="Key1" value="Kevin" />
- Apparently, this is now deprecated. Maybe should use ConfigurationManager API instead.