語言

Extensions.DescendantNodesAndSelf(IEnumerable<XElement>) 方法

定義

回傳一組節點,包含來源集合中的所有元素,以及來源集合中每個元素的後代節點。

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);
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>

其中 A IEnumerable<T>XElement 包含了原始集合。

傳回

其中的 IEnumerable<T>XNode 包含來源集合中的每個元素,以及來源集合中每個元素的後代節點。

備註

雖然 Visual Basic 內建了 XML 軸來處理後代元素,但沒有整合的後代節點軸,因此 Visual Basic 使用者必須明確使用此軸方法。

此方法使用延遲執行。

適用於

另請參閱