时间:2016-02-15 21:32 来源: 我爱IT技术网 作者:佚名
欢迎您访问我爱IT技术网,今天小编为你分享的编程技术是:【.net 读取非标准配置文件的小例子】,下面是详细的讲解!
.net 读取非标准配置文件的小例子
public static string Config(string key)
{
ExeConfigurationFileMap file=new ExeConfigurationFileMap();
file.ExeConfigFilename=@"Providers\\Provider.config";
Configuration config=ConfigurationManager.OpenMappedExeConfiguration(file, ConfigurationUserLevel.None);
AppSettingsSection appsection=(AppSettingsSection)config.GetSection("appSettings");
return appsection.Settings[key].Value;
}
关于.net 读取非标准配置文件的小例子的用户互动如下:
相关问题:
答: >>详细
相关问题:
答: >>详细
相关问题:
答: >>详细
- 【Forms身份认证】Forms身份认证在IE11下无法保存
- 【Asp】Asp.Net性能优化技巧汇总-Net--性能-优化-
- 【AspNetPager】AspNetPager控件的最基本用法
- 【ASP】简单好用的ASP.NET分页类(支持AJAX、自定
- 【net】.net 读取非标准配置文件的小例子-非标准-
- 【asp】asp.net 取消缓存相关问题说明-net-取消缓
- 清除 OutputCache 的方法
- 用TryParseExact将特殊日期格式转回DateTime
- 在ASP.NET WEB API 2进行动态的APICONTROLLER层级
- JSON转换效能评比-Json.NET最优
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
