Extensions.DescendantsAndSelf Method (IEnumerable<XElement>)
Returns a collection of elements that contains every element in the source collection, and the descendent elements of every element in the source collection.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
public static IEnumerable<XElement> DescendantsAndSelf( this IEnumerable<XElement> source )
Although Visual Basic has an integrated XML axis for descendant elements, there is no integrated axis that has the semantics of this method, so Visual Basic users must use this axis method explicitly.
This method uses deferred execution.
Available since 4.5
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1