O'Reilly logo

Introducing Visual C# 2010 by Adam Freeman

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 19. Collections

You will find that you have more and more objects to deal with as your program gets bigger and more complex. And, to make things worse, you will find that as you write increasingly complex code, the number of things you can take for granted starts to diminish. In a simple application, you can create arrays to keep track of objects. You know that there will be exactly ten products to track, so you create an array with ten slots. You know which product object will be in each slot, because there are only ten objects. You'll probably have a sticky note on your desk that has the list. Index 0 is this product, index 1 is that product, and so on.

And that's great—until one day you have to deal with 11 products, or 1,000. Or, much ...

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