Configuration File Reader


  • Lots of configuration things can potentially change, and command line arguments are out of the question.


Sample Code:

// in the code
string mykey = System.Configuration.ConfigurationSettings.AppSettings ["Key1"];
// foobar.exe.config
<?xml version="1.0" encoding="utf-8" ?>
<add key="Key1" value="Kevin" />


  • Apparently, this is now deprecated. Maybe should use ConfigurationManager API instead.

Related Links:

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License