>>>I have the following code:
>>>
>>>
>>>string s = ConfigurationSettings.AppSettings["MySetting"].ToString();
>>>
>>>
>>>I get the warning:
>>>
>>>'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by
>>>System.Configuration!System.Configuration.ConfigurationManager.AppSettings'
>>>
>>>What's the right way to do this?
>>
>>string s = System.Configuration.ConfigurationManager.AppSettings["MySetting"].ToString();
>
>
>Got the error:
>The type or namespace name 'ConfigurationManager' does not exist in the namespace 'System.Configuration' (are you missing an assembly reference?)
Do you have
using System.Configuration
at the top?
I'm working on this right now, give me some time.
If it's not broken, fix it until it is.
My Blog