Export (0) Print
Expand All

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.

  NameDescription
Public method AncestorsAndSelf() Returns a collection of elements that contain this element, and the ancestors of this element.
Public method 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.
Top

The elements in the returned collection are in reverse document order.

This method uses deferred execution.

Community Additions

ADD
Show:
© 2014 Microsoft