The Query Pattern
Now that you’ve seen the various standard query operators that come with LINQ and their query expression counterparts (with varying mileage in C# and Visual Basic), we can make a few more remarks about the query pattern.
The C# language specification refers to the concrete implementation of the querying operators that can be targeted by a query expression as the query pattern. Concretely, it means that any set of objects that happens to have (some) operators such as SelectMany
, Where
, Select
, OrderBy
, and so on can be addressed by using the query expression syntax.
Get C# 5.0 Unleashed 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.