下面方法仅针对默认配置文件
2.0以下版本可用
ConfigurationSettings.AppSettings[key]; system.configuration
2.0以上
ConfigurationManager 需引用system.configuration.dll/v2.0