Chapter 19. C# collection classes

Collection classes are convenient classes acting as data structures for 'holding' multiple objects. Collection classes are often used instead of arrays because they have useful methods for manipulating the objects stored within. While not part of the C# language itself, I have included this chapter because collection classes are used very frequently.

Java 2 came with a whole set of useful collection classes so that we have more choices than java.util.Vector. The Java 2 Collection API includes classes in the java.util package such as Stack, LinkedList, Set, ArrayList, Vector, etc.

Of course the .NET framework comes with its own set of collection classes which can be used by any .NET language. They are found in ...

Get From Java to C#: A Developer's Guide 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.