加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – System.Configuration.ConfigurationManager未解析

发布时间:2020-12-16 00:24:14 所属栏目:百科 来源:网络整理
导读:在我的使用中,我有: using System.Configuration; 然后在我的代码中: string primary_adrs_key = ConfigurationManager.AppSettings["PrimaryAddressK"]; 但我得到错误: “The name ConfigurationManager does not exist in the current context” 为什么
在我的使用中,我有:

using System.Configuration;

然后在我的代码中:

string primary_adrs_key =  ConfigurationManager.AppSettings["PrimaryAddressK"];

但我得到错误:

“The name ConfigurationManager does not exist in the current context”

为什么?我错过了什么?

解决方法

阅读 ConfigurationManager

在项目中添加引用System.Configuration.dll

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读