This topic has not yet been rated - Rate this topic

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
Public method Supported by Silverlight for Windows Phone Supported by Xbox 360 AncestorsAndSelf() Returns a collection of elements that contain this element, and the ancestors of this element.
Public method Supported by Silverlight for Windows Phone Supported by Xbox 360 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.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.