I'm using this namespace:
and here is my code:
private static string _smtpServer = ConfigurationManager.AppSettings["SMTPServer"];
However I am getting a compilation error saying that "ConfigurationManager" does not exist.
Including "using" statement is not enough. In order for compiler to find your target class (ConfigurationManager), you need to REFERENCE the assembly that contains that class definition. In your case, this assembly is known as "System.Configuration".
To add a reference to the above mentioned assembly:
This should make it work. Cheers!