Chapter 9. Learning About Lists, Delegates, and Lambda Expressions

One of the most common pieces of code that you will write is code that manages many object instances. In the previous examples, many object instances were managed using an array. In Chapter 8, you learned that a linked list used in conjunction with an indexer and the yield keyword could make a plain-vanilla object look like a collection. This chapter introduces the .NET collection classes, which provide an easy way to manage a set of object instances. Think of a collection class as an infinite sack where things can be added, iterated through, and retrieved.

The chapter begins with a discussion of how to manage collections. Then we'll look at an example of "code that feels wrong" ...

Get Beginning C# 2008: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.