HttpContext.GetSection(String) 方法

定義

會獲得目前應用程式預設設定的指定配置區塊。

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格式)與配置元素名稱。

傳回

若該區段不存在,則 ConfigurationSection指定為 , null 若執行時無法存取該區段,則為內部物件。

適用於

另請參閱