O'Reilly logo

Beginning C# 2008: From Novice to Professional by Christian Gross

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required