SystemWebSectionGroup 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
允许用户以编程方式访问 system.web 配置文件组。 此类不能被继承。
public ref class SystemWebSectionGroup sealed : System::Configuration::ConfigurationSectionGroup
public sealed class SystemWebSectionGroup : System.Configuration.ConfigurationSectionGroup
type SystemWebSectionGroup = class
inherit ConfigurationSectionGroup
Public NotInheritable Class SystemWebSectionGroup
Inherits ConfigurationSectionGroup
- 继承
示例
下面的代码示例演示如何从与现有 Web 应用程序关联的配置文件中获取 SystemWebSectionGroup 对象。 可以使用此对象访问组中包含的 system.web 部分。
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the <system.web> group.
SystemWebSectionGroup systemWeb =
(SystemWebSectionGroup)configuration.GetSectionGroup("system.web");
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the <system.web> group.
Dim systemWeb As SystemWebSectionGroup = _
CType(configuration.GetSectionGroup( _
"system.web"), SystemWebSectionGroup)
注解
该 SystemWebSectionGroup 类引用 system.web 配置文件中的组。 可以使用此类型访问此组中包含的任何部分。
构造函数
| 名称 | 说明 |
|---|---|
| SystemWebSectionGroup() |
创建 SystemWebSectionGroup的新实例。 |
属性
方法
| 名称 | 说明 |
|---|---|
| Equals(Object) |
确定指定的对象是否等于当前对象。 (继承自 Object) |
| ForceDeclaration() |
强制此 ConfigurationSectionGroup 对象的声明。 (继承自 ConfigurationSectionGroup) |
| ForceDeclaration(Boolean) |
强制此 ConfigurationSectionGroup 对象的声明。 (继承自 ConfigurationSectionGroup) |
| GetHashCode() |
用作默认哈希函数。 (继承自 Object) |
| GetType() |
获取当前实例的 Type。 (继承自 Object) |
| MemberwiseClone() |
创建当前 Object的浅表副本。 (继承自 Object) |
| ShouldSerializeSectionGroupInTargetVersion(FrameworkName) |
指示在为 .NET Framework 的指定目标版本序列化配置对象层次结构时,是否应序列化当前的 ConfigurationSectionGroup 实例。 (继承自 ConfigurationSectionGroup) |
| ToString() |
返回一个表示当前对象的字符串。 (继承自 Object) |