LINQ, or Language Integrated Query, allows you to write structured type-safe queries over local object collections and remote data sources. It is a new feature of C# 3.0 and .NET Framework 3.5.
LINQ lets you query any collection implementing
IEnumerable<>, whether an array, list, XML
DOM, or remote data source (such as a table in SQL Server). LINQ offers
the benefits of both compile-time type checking and dynamic query
The core types that support LINQ are defined in the
System.Linq.Expressions namespaces in the
The examples in this book mirror the examples in Chapters 8–10 of C# 3.0 in a Nutshell (O’Reilly) and are preloaded into an interactive querying tool called LINQPad. You can download LINQPad from http://www.linqpad.net/.