XElement.AncestorsAndSelf Method
Returns a collection of elements that contain this element, and the ancestors of this element.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
AncestorsAndSelf() | Returns a collection of elements that contain this element, and the ancestors of this element. |
|
AncestorsAndSelf(XName) | Returns a filtered collection of elements that contain this element, and the ancestors of this element. Only elements that have a matching XName are included in the collection. |