发布时间:2020-09-06编辑:佚名阅读(1641)
1、在项目中引用System.Configuration.dll 在项目的解决方案中找到引用文件夹-->右建添加引用-->选择.net下的System.Configuration-->确定。
2、在需要的页面加上using System.Configuration
3、把System.Configuration.ConfigurationSettings.AppSettings["你要连的字符串"]; 替换成System.Configuration.ConfigurationManager.AppSettings["你要连的字符串"];
关键字:ConfigurationSettings.AppSettings已过时
上一篇:C#去除XML无效字符
下一篇:注册和卸载DLL
0人
0人
0人
0人