13.5. C#'s Collection Classes
Back in Chapter 6, we discussed the need for a convenient way to collect references to objects as we create them, so that we can iterate over them, retrieve a particular object on demand, and so forth. We learned that the way to do so in an object-oriented programming language (OOPL) is to create a special type of object called a collection, and that one of the simplest collection types in C# is the fixed-size array. When we introduced arrays in Chapter 6, we alluded to the fact that they are objects in the C# language; as it turns out, the System.Array class is the basis for all arrays. We'll revisit arrays in this section to learn about some of the more interesting features of the System.Array class.
As we discussed ...
Get Beginning C# 2008 Objects: From Concept to Code 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.