-----------------------------------------------------------

New Message on AhmedabadUserGroup

-----------------------------------------------------------
From: johnsonsmithy2k2
Message 1 in Discussion

Folks :- 
 
One of developer in my team has pull an encrypted connection string from the 
app.config file. Using 1.1 code that he used to, he used....
System.Configuration.ConfigurationSettings.AppSettings["connstr"].ToString();
And obviously the compiler gave him the following error.
 
Warning 1 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 
'This method is obsolete, it has been replaced by 
ConfigurationManager.AppSettings'

 
So he tried to change his code by following ...
System.Configuration.ConfigurationManager.AppSettings["connstr"].ToString();
 
and he got a compiler error, saying the compiler can't find 
ConfigurationManager.
 
Answer:
Well here's the confusion.... The Original 
System.Configuration.ConfigurationSettings class is found in the System.dll 
assembly. There is a new assembly with all the new 
ConfigurationManager classes as System.Configuration.dll. Before using the 
ConfigurationManager class, you must first set a reference to the new 
System.Configuration.dll.
 
Hope this helps.
 
Thanks,
Smith
http://spaces.msn.com/members/johnysmith


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/AhmedabadUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to