Quantcast
Viewing latest article 16
Browse Latest Browse All 29

Answer by bsivel for Reading settings from app.config or web.config in .NET

Update for .NET Framework 4.5 and 4.6; the following will no longer work:

string keyvalue = System.Configuration.ConfigurationManager.AppSettings["keyname"];

Now access the Setting class via Properties:

string keyvalue = Properties.Settings.Default.keyname;

See Managing Application Settings for more information.


Viewing latest article 16
Browse Latest Browse All 29

Trending Articles