OpenXmlElement.Ancestors Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.