提示System.Configuration中不存在名称或命名空间ConfigurationManager

 在写工厂层的时候这样一句代码:

string StrDB = System.Configuration.ConfigurationManager.AppSettings["DB"];


报错,提示:提示System.Configuration中不存在名称或命名空间ConfigurationManager


解决办法,不是只添加

using System.Configuration;就可以的,

需要添加引用:右键-引用-框架-System.Configuration;

猜你喜欢

转载自blog.csdn.net/wzcyamadie/article/details/79429011