HttpContextBase.GetSection(String) 方法

定义

在派生类中重写时,获取当前应用程序的默认配置的指定配置节。When overridden in a derived class, gets the specified configuration section of the current application's default configuration.

public:
 virtual System::Object ^ GetSection(System::String ^ sectionName);
public virtual object GetSection (string sectionName);
abstract member GetSection : string -> obj
override this.GetSection : string -> obj
Public Overridable Function GetSection (sectionName As String) As Object

参数

sectionName
String

配置节路径(使用 XPath 格式)和配置元素名称。The configuration section path (in XPath format) and the configuration element name.

返回

Object

指定的节;如果该节不存在,则为 nullThe specified section, or null if the section does not exist.

例外

始终。Always.

适用于