.NETFramework:ConfigurationManager
ylbtech-.NETFramework:ConfigurationManager |
1.程序集 System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a返回顶部 |
- #region 程序集 System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
- // C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Configuration.dll
- #endregion
- using System.Collections.Specialized;
- namespace System.Configuration
- {
- //
- // 摘要:
- // 提供对客户端应用程序配置文件的访问。无法继承此类。
- public static class ConfigurationManager
- {
- //
- // 摘要:
- // 获取当前应用程序默认配置的 System.Configuration.AppSettingsSection 数据。
- //
- // 返回结果:
- // 返回一个 System.Collections.Specialized.NameValueCollection 对象,该对象包含当前应用程序默认配置的 System.Configuration.AppSettingsSection
- // 对象的内容。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能使用应用程序设置数据检索 System.Collections.Specialized.NameValueCollection 对象。
- public static NameValueCollection AppSettings { get; }
- //
- // 摘要:
- // 获取当前应用程序默认配置的 System.Configuration.ConnectionStringsSection 数据。
- //
- // 返回结果:
- // 返回一个 System.Configuration.ConnectionStringSettingsCollection 对象,该对象包含当前应用程序默认配置的
- // System.Configuration.ConnectionStringsSection 对象的内容。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能检索 System.Configuration.ConnectionStringSettingsCollection 对象。
- public static ConnectionStringSettingsCollection ConnectionStrings { get; }
- //
- // 摘要:
- // 检索当前应用程序默认配置的指定配置节。
- //
- // 参数:
- // sectionName:
- // 配置节的路径和名称。
- //
- // 返回结果:
- // 指定的 System.Configuration.ConfigurationSection 对象,或者,如果该节不存在,则为 null。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能加载配置文件。
- public static object GetSection(string sectionName);
- //
- // 摘要:
- // 将当前应用程序的配置文件作为 System.Configuration.Configuration 对象打开。
- //
- // 参数:
- // userLevel:
- // 要打开配置的 System.Configuration.ConfigurationUserLevel。
- //
- // 返回结果:
- // 一个 System.Configuration.Configuration 对象。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能加载配置文件。
- public static Configuration OpenExeConfiguration(ConfigurationUserLevel userLevel);
- //
- // 摘要:
- // 将指定的客户端配置文件作为 System.Configuration.Configuration 对象打开。
- //
- // 参数:
- // exePath:
- // 配置文件的路径。配置文件与可执行文件位于同一目录中。
- //
- // 返回结果:
- // 一个 System.Configuration.Configuration 对象。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能加载配置文件。
- public static Configuration OpenExeConfiguration(string exePath);
- //
- // 摘要:
- // 将当前计算机上的计算机配置文件作为 System.Configuration.Configuration 对象打开。
- //
- // 返回结果:
- // 一个 System.Configuration.Configuration 对象。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能加载配置文件。
- public static Configuration OpenMachineConfiguration();
- //
- // 摘要:
- // 可将指定的客户端配置文件作为使用指定文件映射和用户级别的 System.Configuration.Configuration 对象打开。
- //
- // 参数:
- // fileMap:
- // 一个 System.Configuration.ExeConfigurationFileMap 对象,该对象引用代替应用程序的默认配置文件使用的配置文件。
- //
- // userLevel:
- // 要打开配置的 System.Configuration.ConfigurationUserLevel 对象。
- //
- // 返回结果:
- // 一个 System.Configuration.Configuration 对象。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能加载配置文件。
- public static Configuration OpenMappedExeConfiguration(ExeConfigurationFileMap fileMap, ConfigurationUserLevel userLevel);
- //
- // 摘要:
- // 将计算机配置文件作为使用指定文件映射的 System.Configuration.Configuration 对象打开。
- //
- // 参数:
- // fileMap:
- // 一个 System.Configuration.ExeConfigurationFileMap 对象,该对象引用代替应用程序的默认配置文件使用的配置文件。
- //
- // 返回结果:
- // 一个 System.Configuration.Configuration 对象。
- //
- // 异常:
- // T:System.Configuration.ConfigurationErrorsException:
- // 未能加载配置文件。
- public static Configuration OpenMappedMachineConfiguration(ConfigurationFileMap fileMap);
- //
- // 摘要:
- // 刷新命名节,这样在下次检索它时将从磁盘重新读取它。
- //
- // 参数:
- // sectionName:
- // 要刷新的节的配置节名称或配置路径和节名称。
- public static void RefreshSection(string sectionName);
- }
- }
2.返回顶部 |
3.返回顶部 |
4.返回顶部 |
5.返回顶部 |
6.返回顶部 |
![]() |
作者:ylbtech 出处:http://ylbtech.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 |
.NETFramework:ConfigurationManager的更多相关文章
- .NETFramework:DateTimeOffset
ylbtech-.NETFramework:DateTimeOffset 表示一个时间点,通常相对于协调世界时(UTC)的日期和时间来表示. 1.程序集 mscorlib, Version=4.0.0 ...
- .NETFramework:Random
ylbtech-.NETFramework:Random 1.程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c ...
- .NETFramework:StringBuilder
ylbtech-.NETFramework:StringBuilder 1.程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken ...
- .NETFramework:WebClient
ylbtech-.NETFramework:WebClient 1.程序集 System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5 ...
- .NETFramework:Timers
ylbtech-.NETFramework:Timers 1.返回顶部 1. #region 程序集 System, Version=4.0.0.0, Culture=neutral, PublicK ...
- .NETFramework:Stream
ylbtech-.NETFramework:Stream 1.返回顶部 1. #region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, Publi ...
- .NETFramework:HttpContext
ylbtech-.NETFramework:HttpContext 1.返回顶部 1. #region 程序集 System.Web, Version=4.0.0.0, Culture=neutral ...
- .NETFramework:Encoding
ylbtech-.NETFramework:Encoding 1.返回顶部 1. #region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, Pub ...
- .NETFramework:HttpRuntime
ylbtech-.NETFramework:HttpRuntime 1.返回顶部 1. #region 程序集 System.Web, Version=4.0.0.0, Culture=neutral ...
随机推荐
- PHP正则匹配6到16位字符组合(且只能为数字、字母、下划线)
php正则匹配6到16位的字符串. 只允许包含数字.字母.下划线组成的6到16位字符,符合返回ture,否则返回false. 解答: 6到16位,正则可以这样写:{6,16}. 任意的字符6到16位的 ...
- Android API Guides---Supporting Tablets and Handsets
在Android平台上的各种屏幕尺寸的执行和系统调整大小正常应用程序的用户界面.以适应每一个人. 通常情况下,你须要做的是设计你的UI是灵活的,并通过提供替代资源(如又一次定位的一些看法观点或替代尺寸 ...
- Mysql 5.7.18 加密连接mysql_ssl_rsa_setup
MySQL 5.7.18 下载地址: https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64. ...
- linux lamp
1. 用yum安装Apache,Mysql,PHP. 1.1安装Apache yum install httpd httpd-devel 安装完成后,用/etc/init.d/httpd start ...
- 关于TextView 的属性
一.设置不同的字体和颜色值:questionDesTextView=(TextView)findViewById(R.id.question_des); SpannableStringBuilder ...
- Python 字符串操作(截取/替换/查找/分割)
Python 截取字符串使用 变量[头下标:尾下标],就可以截取相应的字符串,其中下标是从0开始算起,可以是正数或负数,下标可以为空表示取到头或尾. # 例1:字符串截取 str = '1234567 ...
- C#操作XML方法:新增、修改和删除节点与属性
一 前言 先来了解下操作XML所涉及到的几个类及之间的关系 如果大家发现少写了一些常用的方法,麻烦在评论中指出,我一定会补上的!谢谢大家 * 1 XMLElement 主要是针对节点的一些属性进行操 ...
- 九度OJ 1033:继续xxx定律 (基础题)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:4987 解决:1201 题目描述: 当n为3时,我们在验证xxx定律的过程中会得到一个序列,3,5,8,4,2,1,将3称为关键数, ...
- 关于dubbo的负载均衡
1 dubbo的集群 将同一个服务部署到多个机器上,然后全部注册到注册中心.这样的多个机器就是一个dubbo集群了. 2 dubbo的负载均衡是怎么回事 由于多台机器上都有同一个服务,因此consum ...
- iOS10.3 UILable中划线失效问题
iOS10.3系统的一个Bug,在UILable中含有中文时,中划线会失效 NSString *priceStr = [NSString stringWithFormat:@"%.2f元&q ...