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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access