Share via


ConfigurationElement.GetChildElement Method

Definition

Returns a child element that is under the current configuration element.

Overloads

GetChildElement(String)

Returns a child element that is under the current configuration element and has the specified name.

GetChildElement(String, Type)

Returns a child element that is under the current configuration element and has the specified name and type.

GetChildElement(String)

Returns a child element that is under the current configuration element and has the specified name.

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

Parameters

elementName
String

The name of the element being requested.

Returns

A ConfigurationElement object.

Exceptions

The elementName parameter is null or empty.

Remarks

You should use this method if the current element does not represent the root element for a collection. To return individual items in a configuration collection, use the GetCollection method.

Applies to

GetChildElement(String, Type)

Returns a child element that is under the current configuration element and has the specified name and 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

Parameters

elementName
String

The name of the element being requested.

elementType
Type

The .NET Framework type of the element being requested.

Returns

A ConfigurationElement object.

Exceptions

The elementType parameter is null.

Remarks

You should use this method if the current element does not represent the root element for a collection. To return individual items in a configuration collection, use the GetCollection method.

Applies to