By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,972 Members | 1,454 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,972 IT Pros & Developers. It's quick & easy.

System.Configuration.CofigurationSettings.AppSetti ngs is obsolete. ANY SOLUTION?

P: n/a
Hi ALL,
I am getting this strange warning message, and I can't seem to find any
solution for it.

'System.Configuration.CofigurationSettings.AppSett ings is obsolete: it has
been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
So, does anyone have a solution to this warning message?

TIA, Randy
Jul 3 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Hi Randy;

Use ConfigurationManager.AppSettings("<SettingName>")

Cheers,

-Mark

Jul 3 '07 #2

P: n/a
Yes, it is obsolete. Make sure your project has a reference to
"System.Configuration". Put a "using System.Configuration" statement at the
very top of your class. Then, do this:
string myValue = ConfigurationManager.AppSettings["mykeyname"];

in VB.NET:

Dim myValue as String = ConfigurationManager.AppSettings("mykeyname")

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder(BETA): http://www.blogmetafinder.com

"Randy Smith" wrote:
Hi ALL,
I am getting this strange warning message, and I can't seem to find any
solution for it.

'System.Configuration.CofigurationSettings.AppSett ings is obsolete: it has
been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
So, does anyone have a solution to this warning message?

TIA, Randy
Jul 3 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.