当使用ConfigurationSettings类来读取应用程序配置文件的信息时,却被警告:警告 1 “System.Configuration.ConfigurationSettings.AppSettings”已过时:“This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings” 于是马上按照提示改变写法,结果却无法在System.Configuration里找到ConfigurationManager,参考了一些书籍,也没详细说明。结果原来是要添加"System.Configuration.dll" 的引用。就这么简单!
而上面那段提示里的一句话:System.Configuration!System.Configuration.ConfigurationManager.AppSettings;原来就是引用的意思,从此记住了,呵!