O'Reilly logo

Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DescendantNodes

The DescendantNodes operator can be called on a sequence of elements and returns a sequence containing the descendant nodes of each element or document.

Prototypes

The DescendantNodes operator has one prototype.

Example. The Only DescendantNodes Prototype
public static IEnumerable<XNode> DescendantNodes<T> (
  this IEnumerable<T> source
) where T : XContainer

This version can be called on a sequence of elements or documents and returns a sequence of nodes containing each source element's or document's descendant nodes.

This is different from the XContainer.DescendantNodes method in that this method is called on a sequence of elements or documents, as opposed to a single element or document.

Examples

For this example, I will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required