vs2005,读取配置文件的时候,得到以下错误:
警告 5 “System.Configuration.ConfigurationSettings.AppSettings”已过时:“This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings”
解决方案就是用System.Configuration.ConfigurationManager.AppSettings["ConnectString"]替代
注意:vs2005默认没有引用System.Configuration,所以必须要添加引用才能使用。