开始使用VS 2005,习惯性的使用ConfigurationSettings类来读取应用程序配置文件的信息时,却被编译器提示说:警告 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 文件的引用~~
事后才留意到,原来MS对这一点还是提示了一下的,只不过比较隐晦而已——
This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings
注意到没有,上面这段话多了System.Configuration!这段
于 是转而想找到那个ConfigurationManager类来使用,结果在System.Configuration命名空间下死活找不到 ConfigurationManager类,无奈,求助于网络,才知道原来还要添加对System.Configuration.dll 文件的引用~~
事后才留意到,原来MS对这一点还是提示了一下的,只不过比较隐晦而已——
This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings
注意到没有,上面这段话多了System.Configuration!这段
本文讲述了在Visual Studio 2005中遇到的问题,即使用ConfigurationSettings类读取应用配置信息时出现的警告,并提供了转向使用ConfigurationManager类的方法及步骤。
1430

被折叠的 条评论
为什么被折叠?



