9. Introduction to LINQ and the List
Collection
Objectives
In this chapter you’ll learn:
• Basic LINQ concepts.
• How to query an array using LINQ.
• Basic .NET collections concepts.
• How to create and use a generic List
collection.
• How to query a generic List
collection using LINQ.
To write it, it took three months; to conceive it three minutes; to collect the data in it—all my life.
—F. Scott Fitzgerald
Science is feasible when the variables are few and can be enumerated ...
—Paul Valéry
You shall listen to all sides and filter them from your self.
—Walt Whitman
The portraitist can select one tiny aspect of everything shown at a moment to incorporate into the final painting.
—Robert Nozick
List, list, O, list!
—William Shakespeare
Get C# 2010 for Programmers, Fourth 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.