在System.Configuration命名空间下死活找不到ConfigurationManager类
来源:互联网 发布:免费考研的软件 编辑:程序博客网 时间:2024/05/23 21:59
这里谈到是三层编程在CLASS里调用的问题:
开始使用VS 2005,习惯性的使用ConfigurationSettings类来读取应用程序配置文件的信息时,却被编译器提示说:警告 1 “System.Configuration.ConfigurationSettings.AppSettings”已过时:“This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings”
于是转而想找到那个ConfigurationManager类来使用,结果在System.Configuration命名空间下死活找不到ConfigurationManager类,无奈,求助于网络,才知道原来还要添加对System.Configuration.dll 文件的引用~~
事后才留意到,原来MS对这一点还是提示了一下的,只不过比较隐晦而已——This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings
注意到没有,上面这段话多了System.Configuration!这段~如: string we=System.Configuration.ConfigurationManager.AppSettings["sql"];
如: System.Web.HttpContext.Current.Cache["Cache1"] = "Value1";System.Web.dll
- 在System.Configuration命名空间下死活找不到ConfigurationManager类
- System.Configuration命名空间下找不到ConfigurationManager类
- System.Configuration命名空间下找不到ConfigurationManager类
- System.Configuration命名空间下找不到ConfigurationManager类
- 引用了System.Configuration命名空间,却找不到ConfigurationManager类
- 引用了System.Configuration命名空间,却找不到ConfigurationManager类
- c# [app.config] 找不到 "ConfigurationManager",即使添加了命名空间 using System.Configuration;
- “System.Configuration”中不存在类型或命名空间名称“ConfigurationManager”
- 命名空间System.Configuration中不存在类型或命名空间名称ConfigurationManager
- 命名空间引用问题 包括找不到ConfigurationManager 这个类
- “System.Configuration”中不存在类型或命名空间名称“ConfigurationManager”错误的解决方法
- 关于错误“System.Configuration”中不存在类型或命名空间名称“ConfigurationManager”
- 引入System.Configuration命名空间后仍无法打出ConfigurationManager错误
- 关于错误“System.Configuration”中不存在类型或命名空间名称“ConfigurationManager”
- System.Configuration 命名空间
- 错误4命名空间“System.Configuration”中不存在类型或命名空间名称“ConfigurationManager”。是否缺少程序集引用?
- System.Configuration.ConfigurationManager.GetSection
- System.Configuration.ConfigurationManager.AppSettings["connString"];
- visio如何扩大画布的大小
- NUnit学习笔记之进阶篇
- 网络协议词典-A
- 浅谈spring时序调度Quartz
- 改变2000系统默认的文件夹显示方式
- 在System.Configuration命名空间下死活找不到ConfigurationManager类
- callback(3)--使用方法覆盖
- Flex开发自定义控件
- 截取字符串方法总结(区分汉字、数字、字母)
- ubuntu 8.04 nginx 安装
- .net生成静态页方法总结
- 网上下载的 图片加上水印功能 只作为一个tag
- 想成为嵌入式程序员应知道的10个基本问题
- css 禅意花园