却被编译器提示说: 警告 1 “System.Configuration.ConfigurationSettings.AppSettings”已过时:“This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings”
于是转而想找到那个ConfigurationManager类来使用,结果在System.Configuration命名空间下死活找不到ConfigurationManager类, 无奈,求助于网络,才知道原来还要添加对System.Configuration.dll 文件的引用~~
在所要使用ConfigurationManager的程序集中找到引用接口,点击程序集,然后找到引用System.Configuration;
第一步打开解决方案资源管理器
第二步右击引用节点单机添加引用
第三步在程序集中找到system.configuration