首页 > 移动平台 > 详细

使用app.config中的数据对数据库链接信息初始化

时间:2016-04-20 11:30:44      阅读:247      评论:0      收藏:0      [点我收藏+]

看到别人数据库信息都是在app.config里面设置的,今天来尝试了一下,报了

"System.Configuration.ConfigurationSettings.AppSettings"已过期:"this method has obsolete,it has been repalced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings"

的警告,上网查了一下,得知需要在 引用  中添加引用选System.Configuration,然后确定,再在类上写  using System.Configuration;

接着把System.Configuration.ConfigurationSettings.AppSettings改成System.Configuration.ConfigurationManager.AppSettings

然后就没有报警告了。

使用app.config中的数据对数据库链接信息初始化

原文:http://www.cnblogs.com/cellphoneyeah/p/5411682.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!