OpenXmlElement.Ancestors Method

Definition

Overloads

Ancestors()

Enumerates all of the current element's ancestors.

Ancestors<T>()

Enumerates only the current element's ancestors that have the specified type.

Ancestors()

Enumerates all of the current element's ancestors.

public System.Collections.Generic.IEnumerable<DocumentFormat.OpenXml.OpenXmlElement> Ancestors ();
member this.Ancestors : unit -> seq<DocumentFormat.OpenXml.OpenXmlElement>
Public Iterator Function Ancestors () As IEnumerable(Of OpenXmlElement)

Returns

An IEnumerable object that contains a list of the current OpenXmlElement element's ancestors.

Applies to

Ancestors<T>()

Enumerates only the current element's ancestors that have the specified type.

public System.Collections.Generic.IEnumerable<T> Ancestors<T> () where T : DocumentFormat.OpenXml.OpenXmlElement;
member this.Ancestors : unit -> seq<'T (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)> (requires 'T :> DocumentFormat.OpenXml.OpenXmlElement)
Public Iterator Function Ancestors(Of T As OpenXmlElement) () As IEnumerable(Of T)

Type Parameters

T

The element type.

Returns

An IEnumerable object that contains a list of the current OpenXmlElement element's ancestors.

Applies to