You are previewing C# in Depth, Second Edition.

C# in Depth, Second Edition

Cover of C# in Depth, Second Edition by Jon Skeet Published by Manning Publications
O'Reilly logo

Appendix A. LINQ standard query operators

There are many standard query operators in LINQ, only some of which are supported directly in C# query expressions—the others have to be called manually as normal methods. Some of the standard query operators are demonstrated in the main text of the book, but they’re all listed in this appendix. Most of the examples use the following two sample sequences:

string[] words = {"zero", "one", "two", "three", "four"};int[] numbers = {0, 1, 2, 3, 4};

For completeness I’ve included the operators we’ve already seen, although in most cases chapter 11 contains more detail on them than I’ve provided here. The behavior specified here is that of LINQ to Objects; other providers may work differently. For each operator, ...

The best content for your career. Discover unlimited learning on demand for around $1/day.