O'Reilly logo

LINQ for Visual C# 2008 by Fabio Claudio Ferracchiati

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

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 ...

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