Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Has warning message when use ConfigurationSettings.GetCo
Message
De
08/08/2006 13:13:39
 
 
À
08/08/2006 05:38:20
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
Divers
Thread ID:
01143727
Message ID:
01143834
Vues:
7
The old one may be obsolete, but it still works I think (at least I haven't changed any of my code, and I'm not having any problem accessing my config).

But if you want to use the new one, then you need to add System.Configuration as a new reference in your project. Once that's done, you won't get those compiler errors and it will all show up in Intellisense for you.

~~Bonnie



>When I use ConfigurationSettings.GetConfig() function in Visual Studio 2005, the IDE shows warning message as below:
>
>
>Warning	1	
>'Public Shared Function GetConfig(sectionName As String) As Object' is obsolete:
>'This method is obsolete, it has been replaced by System.Configuration!
>System.Configuration.ConfigurationManager.GetSection'	
>D:\Project\WinApp1\Config.vb	8	22	WinApp1
>
>
>I changed my source code from using ConfigurationSettings.GetConfig() function to System.Configuration.ConfigurationManager.GetSection(). Then I compiled the source code. Now the IDE shows error message as below:
>
>
>Error	1	'ConfigurationManager' is not a member of 'Configuration'.
>D:\Project\WinApp1\Config.vb	8	22	WinApp1
>
>
>May I know what is the correct way to access ConfigurationManager? Thanks.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform