using System.Configuration;
string s = ConfigurationSettings.AppSettings["con"];
the code above gets the value from the app.config file where the following markup exists
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="con" value="foo"/>
</appSettings>
</configuration>