var values = new NameValueCollection
{
{ \"key\", ConfigurationSettings.AppSettings[\"API-Key\"].ToString() },
{ \"image\", Convert.ToBase64String(File.ReadA
Use the System.Configuration.ConfigurationManager class
string ServerName = System.Configuration.ConfigurationManager.AppSettings["Servername"];
Edit - added
Note, you may have to add a reference to System.Configuration.dll. Even if you can import the namespace without the reference, you will not be able to access this class unless you have the reference.