Chapter 9. Collections

Collections are one of the cornerstones of a modern programming language. Java has not always had good collection support, and only since Java 1.2 has the platform benefited from a strong collection class library. The collections provided in Microsoft .NET are less flexible than those in Java but include some interesting features that help to address the differences.

The first part of this chapter covers indexers, which are a useful language construct employed by all of the collection classes. We move on to explain the interfaces that define the basic collection contracts; then we discuss the collections themselves. Much of the chapter is given over to the individual collection classes. The most commonly used collections ...

Get C# for Java Developers 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.