HttpContext.GetSection(String) HttpContext.GetSection(String) HttpContext.GetSection(String) HttpContext.GetSection(String) Method

定義

取得目前應用程式預設組態的指定組態區段。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 String String String

組態區段路徑 (XPath 格式) 和組態項目名稱。The configuration section path (in XPath format) and the configuration element name.

傳回

如果區段不存在,則指定的 ConfigurationSectionnull;或如果區段在執行階段無法存取,則為內部物件。The specified ConfigurationSection, null if the section does not exist, or an internal object if the section is not accessible at run time.

適用於

另請參閱