HttpContext.GetSection(String) 方法

定义

获取当前应用程序的默认配置的指定配置节。Gets a specified configuration section for the current application's default configuration.

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

参数

sectionName
String

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

返回

指定的 ConfigurationSection,如果该节不存在,则为 null,或是如果该节不能在运行时访问,则为一个内部对象。The specified ConfigurationSection, null if the section does not exist, or an internal object if the section is not accessible at run time.

适用于

另请参阅