.NET Framework Class Library
Extensions..::.Ancestors Method
Returns a collection of elements that contains the ancestors of every node in the source collection.

Overload List

Remarks
If multiple nodes in the source collection have the same ancestor, the ancestor will be included multiple times in the result collection. To avoid this, use the Distinct method.
This method uses deferred execution.

See Also