New C# 3.0 Language Additions

To make LINQ seamlessly integrate with C#, significant enhancements were needed for the C# language. Virtually every significant enhancement to the C# language made in version 3.0 was made specifically to support LINQ. While all of these features have merit on their own, it is really the sum of the parts contributing to LINQ that makes C# 3.0 so noteworthy.

To truly understand much of the syntax of LINQ, it is necessary for me to cover some of the new C# 3.0 language features before proceeding with the workings of the components of LINQ. This chapter will cover the following language additions:

  • Lambda expressions

  • Expression trees

  • The keyword var, object and collection initialization, and anonymous types

  • Extension methods ...

Get Pro LINQ: Language Integrated Query in C# 2008 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.