O'Reilly logo

Essential C# 2.0 by Mark Michaelis

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

12. Collections

THE MOST PREVALENT USE of generics in any language is in the area of collections. Collections deal with sets of like objects and with managing those objects as a group. This chapter looks at the collection classes provided with the runtime and how you use them within your applications. It also covers the various collection interfaces and how they relate to each other, and it includes a discussion of how to create custom collections using iterators. This C# 2.0 feature simplifies implementation of how the foreach statement iterates over the elements in a collection. Iterators not only encapsulate the internal data structure of your collection classes, but they also improve control over end-user access and the use of data within ...

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