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

InDocumentOrder

The InDocumentOrder operator can be called on a sequence of nodes and returns a sequence containing each source node's child nodes in document order.

Prototypes

The InDocumentOrder operator has one prototype.

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

This version is called on a sequence of a specified type, which must be nodes or some type derived from nodes, and returns a sequence of that same type containing each source node's child nodes in document order.

Examples

This is a fairly odd operator. For this example, I need a source sequence of nodes. Since I want to see some nodes that are not elements in addition to elements, ...

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