Quantcast
Channel: Reading settings from app.config or web.config in .NET - Stack Overflow
Viewing all articles
Browse latest Browse all 29

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

$
0
0

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 all articles
Browse latest Browse all 29

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>