How to

get value from AppSettings in App.config or Web.config

Published: 9. October 2011 | Updated: 9. October 2011
License: Microsoft Public License (MS-PL)
Categories: Framework
Tags: C# Console Winforms WPF
Was this snippet helpful for you? YESYES / NONO

Import namespace

// requires add reference to System.Configuration from GAC
using System.Configuration;

Code

string value = ConfigurationManager.AppSettings["key"];
Send us feedback about this snippet »



Related Snippets: