C# App.config文件配置数据的读写
2015-07-15 15:24
645 查看
添加程序集引用 System.configuration.dll 和命名空间 using System.Configuration;
读:
写:
读:
ConfigurationManager.AppSettings["节点名称"]
写:
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); if (config.HasFile) { config.AppSettings.Settings["节点名称"].Value = 节点新值; config.Save(ConfigurationSaveMode.Modified); }
相关文章推荐
- [Object-c]UITextView 在边缘位置没有文字的属性 UIEdgeInsets
- 使用Cocos2d-x 和粒子编辑器实现“天天爱消除”场景特效
- Android抽象布局——include、merge 、ViewStub
- Objective-c strong weak
- Android studio 去掉没用的import
- .NET微信公众号开发-3.0查询自定义菜单
- Android的布局学习笔记
- Android Data Binding学习
- 为iOS应用/游戏内建购买项目(IAP)
- IBM Notes and Domino Application Development Wiki -XPage
- 360浏览器Uncaught TypeError: object is not a function问题
- Android 英文文档下载地址
- 【iOS】TableView的footerView不随cell滚动而停留在tableView底部的问题
- Android中 ScrollView(ListView)中嵌套ListView时显示不全的简便解决方案
- android常见类(Thread Handler Looper相关)
- Objective-C 编程艺术
- Android中visibility属性VISIBLE、INVISIBLE、GONE的区别
- android 读取资源文件
- iOS-某公司笔试题
- app后台设计总结