Using Collections

This chapter is about the rich support in C# for handling collections such as arrays, bit arrays, queues, stacks, hash tables, and others. Collections are groupings of objects that support properties such as Count to hold the number of objects in the collection, and methods such as Add to add a new object to the collection. You can access members of the collection with various methods, such as using [] with arrays, Push and Pop methods with stacks, and so on.

As you become experienced in C#, you'll find yourself using collections more and more frequently as your code scales to larger applications. We've already worked with arrays throughout the book—now we'll see what they're capable of as we take a more in-depth look. After ...

Get Microsoft® Visual C#® .NET 2003 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.