Arrays and Collections

Chapter 5, discusses arrays, which are collections of related types. C# supports one-dimensional and multidimensional arrays. Jagged arrays, which are arrays of arrays, also are supported. System.Array is the underlying type of all arrays and defines the baseline behavior of all arrays. You can learn a lot about arrays by examining the System.Array class. For example, the Array.SyncRoot property is used to synchronize access to an array. Arrays implement a myriad of interfaces, such as ICloneable, ICollection, and IEnumerable. The next chapter discusses the members and purpose of each of these interfaces.

More sophisticated collections are sometimes needed. The .NET Framework offers ArrayList, Queue, Stack, HashTable, and ...

Get Programming Microsoft® Visual C#® 2008: The Language 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.