Element (XElement Dynamic Property)

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets an indexer used to retrieve the child element instance that corresponds to the specified expanded name.

Syntax

elem.Element[{namespaceName}localName]

Property Value/Return Value

An indexer of the type XElement Item(String expandedName). This indexer takes an expanded name parameter and returns the corresponding XElement, or null if there is no element with the specified name.

Remarks

This property is equivalent to Element method of the System.Xml.Linq.XContainer class.

See Also

System.Xml.Linq.XContainer.Element XElement Class Dynamic Properties Elements