Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
App.Config Question
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01324941
Message ID:
01324945
Vues:
12
>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();
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform