看到别人数据库信息都是在app.config里面设置的,今天来尝试了一下,报了 "System.Configuration.ConfigurationSettings.AppSettings"已过期:"this method has obsolete,it has been repalced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings" 的警告,上网查了一
最近我做的一些项目,经常需要用到对应用程序的配置文件操作,如app.config和web.config的配置文件,特别是对配置文件中的[appSettings]和[connectionStrings]两个节点常常进行新增.修改.删除和读取相关的操作的,所以,我自己就亲手把这些相关的操作都封装到一个配置文件管理器中,用静态的方法来调用便可,以下是我的实现,以资参考. using System; using System.Data; using System.Configuration; using