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 looked at, 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 ...
Get C# in Depth, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.