共用方式為


ConfigurationElement.GetChildElement 方法

定義

傳回目前組態專案底下的子專案。

多載

GetChildElement(String)

傳回目前組態專案下且具有指定名稱的子專案。

GetChildElement(String, Type)

傳回目前組態專案下且具有指定名稱和類型的子專案。

GetChildElement(String)

傳回目前組態專案下且具有指定名稱的子專案。

public:
 Microsoft::Web::Administration::ConfigurationElement ^ GetChildElement(System::String ^ elementName);
public Microsoft.Web.Administration.ConfigurationElement GetChildElement (string elementName);
member this.GetChildElement : string -> Microsoft.Web.Administration.ConfigurationElement
Public Function GetChildElement (elementName As String) As ConfigurationElement

參數

elementName
String

所要求之專案的名稱。

傳回

ConfigurationElement 物件。

例外狀況

elementName 參數是 null 或空白。

備註

如果目前的專案不代表集合的根項目,您應該使用這個方法。 若要傳回組態集合中的個別專案,請使用 GetCollection 方法。

適用於

GetChildElement(String, Type)

傳回目前組態專案下且具有指定名稱和類型的子專案。

public:
 Microsoft::Web::Administration::ConfigurationElement ^ GetChildElement(System::String ^ elementName, Type ^ elementType);
public Microsoft.Web.Administration.ConfigurationElement GetChildElement (string elementName, Type elementType);
member this.GetChildElement : string * Type -> Microsoft.Web.Administration.ConfigurationElement
Public Function GetChildElement (elementName As String, elementType As Type) As ConfigurationElement

參數

elementName
String

所要求之專案的名稱。

elementType
Type

所要求專案的.NET Framework型別。

傳回

ConfigurationElement 物件。

例外狀況

elementType 參數為 null

備註

如果目前的專案不代表集合的根項目,您應該使用這個方法。 若要傳回組態集合中的個別專案,請使用 GetCollection 方法。

適用於