Skip to content

Node<TNode>.AncestorsOfType Method ​

Definition ​

Lazily enumerates over this node and its Ancestors, returning only ancestors of the specified type.

c#
public IEnumerable<TAncestor> AncestorsOfType<TAncestor>()
   where TAncestor : TNode;

View source

Type Parameters ​

NameDescription
TAncestorThe type of ancestors to return.

Returns ​

IEnumerable<TAncestor>