Export (0) Print
Expand All

GetChildElement Method (String, Type)

IIS 7.0

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

Namespace:  Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public ConfigurationElement GetChildElement(
	string elementName,
	Type elementType
)

Parameters

elementName
Type: System..::..String
The name of the element being requested.
elementType
Type: System..::..Type
The .NET Framework type of the element being requested. 

ExceptionCondition
ArgumentNullException

The elementName parameter is nullNothingnullptrunita null reference (Nothing in Visual Basic) or empty.

ArgumentNullException

The elementType parameter is nullNothingnullptrunita null reference (Nothing in Visual Basic).

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.

Community Additions

ADD
Show:
© 2014 Microsoft