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.

Extensions::DescendantNodesAndSelf Method (IEnumerable<XElement^>^)

 

Returns a collection of nodes that contains every element in the source collection, and the descendant nodes of every element in the source collection.

Namespace:   System.Xml.Linq
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)

public:
[ExtensionAttribute]
static IEnumerable<XNode^>^ DescendantNodesAndSelf(
	IEnumerable<XElement^>^ source
)

Parameters

source
Type: System.Collections.Generic::IEnumerable<XElement^>^

An IEnumerable<T> of XElement that contains the source collection.

Return Value

Type: System.Collections.Generic::IEnumerable<XNode^>^

An IEnumerable<T> of XNode that contains every element in the source collection, and the descendant nodes of every element in the source collection.

Although Visual Basic has an integrated XML axis for descendant elements, there is no integrated axis for descendant nodes, so Visual Basic users must use this axis method explicitly.

This method uses deferred execution.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft