In Brief

This chapter discussed how to work with and create your own collections in C#. Here's an overview of the topics we've discussed:

  • Arrays, which are supported by the System.Array class. This is actually an abstract class; you're better off using the standard array syntax in C#. Arrays support the methods and properties of the System.Array class.

  • Bit arrays, based on the BitArray class, let you access the individual elements of an array as bits.

  • ArrayList collections work much like arrays, except that they're extensible. You can add and remove elements in array lists using the Add and Remove methods.

  • Hashtable collections are dictionary collections that let you store values using keys. Instead of an array index, you pass the key to the hash ...

Get Microsoft® Visual C#® .NET 2003 Kick Start 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.