from
http://www.csharpfriends.com/Members/Main/Tutorials/get_tutorial.aspx?tutID=45
NET follows the convention of automatically loading configuration settings from a file from the same directory as the executable, where the filename is the executable's name with '.config' appended (e.g. for myapp.exe, the config file is myapp.exe.config). WorldConsole.exe.config: 
<?xml version="1.0" encoding="utf-8" ?> 
<configuration>
    <appSettings>
        <add key="Message" value="Hello, World!" />
    </appSettings>
</configuration>
 WorldConsole.cs: 
using System;
using System.Configuration;namespace World
{
    class WorldConsole
    {
        static void Main(string[] args)
        {
            Console.WriteLine(ConfigurationSettings.AppSettings["Message"]);
        }
    }
}