Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Descendants (XElement Dynamic Property)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Descendants (XElement Dynamic Property).

Gets an indexer used to retrieve all the descendant elements of the current element that match the specified expanded name.

elem.Descendants[{namespaceName}localName]  

An indexer of the type IEnumerable<XElement> Item(String expandedName). This indexer takes the expanded name of the specified descendant elements and returns the matching child elements in an IEnumerable<XElement> collection.

This property is equivalent to the XContainer.Descendants(XName) method of the XContainer class.

The elements in the returned collection are in XML source document order.

This property uses deferred execution.

XElement Class Dynamic Properties
Elements

Show:
© 2017 Microsoft