15. Query Expressions
THE END OF CHAPTER 14 showed a query using standard query operators for GroupJoin()
, SelectMany()
, and Distinct()
, in addition to the creation of two anonymous types. The result was a statement that spanned multiple lines and was fairly complex to comprehend, certainly much more complex than statements typically written in C# 2.0, even though it appears fully compatible with C# 2.0 syntax. The introduction of standard query operators facilitated a far greater likelihood of scenarios where such complex statements were desirable even though the resultant code may not be. In addition, the queries that standard query operators implemented were functionally very similar to queries generally implemented in SQL.
The culmination ...
Get Essential C# 3.0: For .NET Framework 3.5 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.