4
Reply

Reading Configuration File

Ron

Ron

Aug 17 2010 12:24 PM
2.9k

I attempted to read a connection string from my app.config file using in part:
strConString = System.Configuration.ConfigurationSettings.AppSettings.Get("WicConnectionString");
Visual Studio reported this message:

System.Configuration.ConfigurationSettings.AppSettings is obsolete: This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings

Thinking that ConfigurationManager was an addition to framework 4, (currently using 3.5) I downloaded 4.
However, when I enter in code System.Configuration... ConfigurationManager is not presented by intellisense as an option.

What am I doing incorrectly?
 

 

Answers (4)