четверг, 8 октября 2009 г.

HOW TO get value from app.config file

file: app.config

xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings >
<add key="myname" value="myvalue"/>
appSettings >

configuration>


in *.cs

using System.Configuration;

string name = Convert.ToString(ConfigurationSettings.AppSettings["myname"]);