Working with Collections
Arrays provide a mechanism for storing a set of data, but it is quite cumbersome to dynamically alter the size of an array. Collection classes provide convenient dynamic containers for storing information and allow dynamic insertion and deletion capabilities. Collection classes are grouped under the System.Collections and System.Collections.Specialized namespaces. Collections implement an IEnumerable interface and provide an Enumerator to iterate over the elements contained in the collection. Key collection classes provided by the .NET Framework include the following:
ArrayList— A basic collection; an array whose size can be dynamically increased
Hashtable— A key/value pair collection organized by the hash code of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access