Extensions.DescendantsAndSelf 方法

定義

傳回來源集合中每個項目的集合,以及來源集合中每個項目的所有子代項目。

多載

DescendantsAndSelf(IEnumerable<XElement>)

傳回包含來源集合中每個項目的項目集合,以及來源集合中每個項目的子代項目。

DescendantsAndSelf(IEnumerable<XElement>, XName)

傳回包含來源集合中每個項目的已篩選項目集合,以及來源集合中每個項目的子代。 集合中只會包含具有相符之 XName 的項目。

備註

雖然 Visual Basic 具有子代元素的整合式 XML 軸,但沒有具有此方法語意的整合式座標軸。

這個方法會使用延後的執行。

DescendantsAndSelf(IEnumerable<XElement>)

傳回包含來源集合中每個項目的項目集合,以及來源集合中每個項目的子代項目。

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

參數

source
IEnumerable<XElement>

IEnumerable<T>XElement,其中包含來源集合。

傳回

IEnumerable<T>XElement,包含來源集合中的每個項目,以及來源集合中每個項目的子代項目。

備註

雖然 Visual Basic 具有子代元素的整合式 XML 軸,但沒有具有此方法語意的整合式座標軸,因此 Visual Basic 使用者必須明確使用此軸方法。

這個方法會使用延後的執行。

另請參閱

適用於

DescendantsAndSelf(IEnumerable<XElement>, XName)

傳回包含來源集合中每個項目的已篩選項目集合,以及來源集合中每個項目的子代。 集合中只會包含具有相符之 XName 的項目。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ DescendantsAndSelf(System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ source, System::Xml::Linq::XName ^ name);
public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> DescendantsAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> source, System.Xml.Linq.XName name);
public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> DescendantsAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement?> source, System.Xml.Linq.XName? name);
static member DescendantsAndSelf : seq<System.Xml.Linq.XElement> * System.Xml.Linq.XName -> seq<System.Xml.Linq.XElement>
<Extension()>
Public Function DescendantsAndSelf (source As IEnumerable(Of XElement), name As XName) As IEnumerable(Of XElement)

參數

source
IEnumerable<XElement>

IEnumerable<T>XElement,其中包含來源集合。

name
XName

要比對的 XName

傳回

IEnumerable<T>XElement,包含來源集合中每個項目的項目集合,以及來源集合中每個項目的子代。 集合中只會包含具有相符之 XName 的項目。

備註

雖然 Visual Basic 具有子代元素的整合式 XML 軸,但沒有具有此方法語意的整合式座標軸,因此 Visual Basic 使用者必須明確使用此軸方法。

這個方法會使用延後的執行。

另請參閱

適用於