11. Introduction to LINQ

You shall listen to all sides and filter them from your self.

—Walt Whitman

Objectives

In this chapter you’ll learn:

• Basic LINQ concepts.

• How to query an array using LINQ.

• How to sort an array in ascending or descending order using LINQ.

• How to perform transformations on the results of a LINQ query.

• How to select a portion of the properties for each object in a query result.

• How to create new objects as the result of a LINQ query.

• How a LINQ query executes only when you iterate over the results—a concept called deferred execution.

Get Visual Basic® 2012 How to Program, Sixth Edition 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.