最新的framework使用如下方法:
using System.Configuration; ConfigurationManager.AppSettings["key"];
App.config中,如下配置:
<appSettings> <add key="key" value="value"/> </appSettings>
C#中App.config文件配置获取
原文:http://www.cnblogs.com/amwuau/p/7513880.html