app.config动态修改及读取
摘要:
1.添加应用程序配置文件右键点击项目,选择“添加”→“添加新建项”→“添加应用程序配置文件”将其添加到项目中。2.设置配置文件 3.读取配置文件(项目中必须添加system.configuration引用:右击项目-添加引用-选择.net中system.configuration)public string ReadConfig(){ConfigurationManager.RefreshSection("connectionStrings"); //读取之前强制刷新节点清除缓存ConfigurationManager.RefreshSection("appSet 阅读全文
posted @ 2013-12-12 15:48 MisterS 阅读(4401) 评论(0) 推荐(0)
浙公网安备 33010602011771号