Extensions.DescendantsAndSelf Extensions.DescendantsAndSelf Extensions.DescendantsAndSelf Extensions.DescendantsAndSelf Method

定義

傳回來源集合中每個項目的集合,以及來源集合中每個項目的所有子代項目。Returns a collection of every element in the source collection, and all descendant elements for every element in the source collection.

多載

DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(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.

DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName)

傳回包含來源集合中每個項目的已篩選項目集合,以及來源集合中每個項目的子代。Returns a filtered collection of elements that contains every element in the source collection, and the descendents of every element in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

備註

雖然 Visual Basic 具有整合式的 XML 座標軸的子代項目,還有沒有這個方法的語意的整合式的座標軸。Although Visual Basic has an integrated XML axis for descendant elements, there is no integrated axis that has the semantics of this method.

這個方法會使用延後的執行。This method uses deferred execution.

DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(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.

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);
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,其中包含來源集合。An IEnumerable<T> of XElement that contains the source collection.

傳回

IEnumerable<T>XElement,包含來源集合中的每個項目,以及來源集合中每個項目的子代項目。An IEnumerable<T> of XElement that contains every element in the source collection, and the descendent elements 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 that has the semantics of this method, so Visual Basic users must use this axis method explicitly.

這個方法會使用延後的執行。This method uses deferred execution.

另請參閱

DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName)

傳回包含來源集合中每個項目的已篩選項目集合,以及來源集合中每個項目的子代。Returns a filtered collection of elements that contains every element in the source collection, and the descendents of every element in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

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);
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,其中包含來源集合。An IEnumerable<T> of XElement that contains the source collection.

name
XName XName XName XName

要比對的 XNameThe XName to match.

傳回

IEnumerable<T>XElement,包含來源集合中每個項目的項目集合,以及來源集合中每個項目的子代。An IEnumerable<T> of XElement that contains every element in the source collection, and the descendents of every element in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

備註

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

另請參閱

適用於