You are previewing LINQ in Action.

LINQ in Action

Cover of LINQ in Action by Fabrice Marguerie... Published by Manning Publications
O'Reilly logo

Chapter 2. C# and VB.NET language enhancements

This chapter covers:

  • Key C# 3.0 and VB.NET 9.0 languages features for LINQ
  • Implicitly typed local variables
  • Object initializers
  • Lambda expressions
  • Extension methods
  • Anonymous types

In chapter 1, we reviewed the motivation behind LINQ and introduced some code to give you an idea of what to expect. In this chapter, we’ll present the language extensions that make LINQ possible and allow queries to blend into programming languages.

LINQ extends C# and VB.NET with new constructs. We find it important that you discover these language features before we get back to LINQ content. This chapter is a stepping stone that explains how the C# and VB.NET languages have been enriched to make LINQ possible. ...

The best content for your career. Discover unlimited learning on demand for around $1/day.