Extensions.DescendantNodesAndSelf(IEnumerable<XElement>) Extensions.DescendantNodesAndSelf(IEnumerable<XElement>) Extensions.DescendantNodesAndSelf(IEnumerable<XElement>) Extensions.DescendantNodesAndSelf(IEnumerable<XElement>) Method

定義

傳回包含來源集合中每個項目的節點集合,以及來源集合中每個項目的子代節點。Returns a collection of nodes that contains every element in the source collection, and the descendant nodes of every element in the source collection.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Xml::Linq::XNode ^> ^ DescendantNodesAndSelf(System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ source);
public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XNode> DescendantNodesAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> source);
static member DescendantNodesAndSelf : seq<System.Xml.Linq.XElement> -> seq<System.Xml.Linq.XNode>
<Extension()>
Public Function DescendantNodesAndSelf (source As IEnumerable(Of XElement)) As IEnumerable(Of XNode)

參數

source
IEnumerable<XElement>

IEnumerable<T>XElement,其中包含來源集合。An IEnumerable<T> of XElement that contains the source collection.

傳回

IEnumerable<T>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.

備註

雖然 Visual Basic 具有整合式的 XML 座標軸的子代項目,是沒有整合的軸的子系節點,因此 Visual Basic 使用者必須明確地使用此座標軸方法。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.

適用於

另請參閱