0
点赞
收藏
分享

微信扫一扫

C#中提示:当前上下文中不存在名称“ConfigurationManager”

爱情锦囊 2023-02-15 阅读 55


场景

想要在程序中获取App.config中设置的内容。

想要通过

ConfigurationManager.AppSettings[key];

来进行获取,已经添加

using System.Configuration;

但是还是提示“当前上下文中不存在名称ConfigurationManager”

C#中提示:当前上下文中不存在名称“ConfigurationManager”_C#

 

实现

除了添加using System.Configuration;

还要重新添加引用

右击引用--添加--System.Configuration

C#中提示:当前上下文中不存在名称“ConfigurationManager”_C#_02

 

举报

相关推荐

0 条评论