O'Reilly logo

Essential C# 4.0 by Mark Michaelis

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

15. LINQ with 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 a lot 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 scenarios where such complex statements were desirable even though the resultant code may be complex and hard to read. In addition, the queries which standard query operators implemented were functionally very similar to queries generally implemented in SQL.

The culmination ...

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