Skip to content

Node<TNode>.ThisAndAncestorsOfType Method ​

Definition ​

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

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

View source

Type Parameters ​

NameDescription
TAncestorThe type of ancestors to return.

Returns ​

IEnumerable<TAncestor>