1.10. Standard Query Operators

LINQ provides an API known as standard query operators (SQOs) to support the kinds of operations we're accustomed to in SQL. You've already used C#'s select and where keywords, which map to LINQ's Select and Where SQOs—which, like all SQOs, are actually methods of the System.Linq.Enumerable static class. Table 1-1 is a complete listing of SQOs.

Table 1-1. LINQ Standard Query Operators Grouped by Operation
OPERATIONOPERATORDESCRIPTION
AggregateAggregateApplies a function over a sequence
 AverageCalculates the average over a sequence
 Count/LongCountCounts the element of a sequence
 MaxReturns the maximum value from a sequence of numeric values
 MinReturns the minimum value from a sequence of numeric values
 SumReturns ...

Get LINQ for Visual C# 2008 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.