.NET Core API Documentation
The System.Collections namespace contains interfaces and classes that define various collections of objects, such as lists, queues, arrays, hash tables, and dictionaries. These collections are fundamental building blocks for managing groups of related objects in .NET applications.
While the generic collection types in System.Collections.Generic are generally preferred for type safety and performance, the non-generic collections remain relevant for compatibility and certain scenarios.
IEnumerableSupports iteration over a collection of a type that does not use generics.
ICollectionRepresents a collection of objects of the same type that does not use generics.
IListRepresents a non-generic collection of objects that can be individually accessed by index.
IDictionaryRepresents a non-generic collection of key/value pairs.
ArrayListRepresents a strongly typed list of objects that can be accessed by index. It grows dynamically as elements are added.
HashtableRepresents a collection of key and value pairs that are organized based on the hash code of the key. It is not generic.
QueueRepresents a strongly typed collection of objects that can be accessed by index. The first object added is the first object retrieved.
StackRepresents a strongly typed collection of objects that can be accessed by index. The last object added is the first object retrieved.
SortedListRepresents a collection of key/value pairs that are sorted by the keys and can be accessed by index. It is not generic.
DictionaryEntryRepresents a key and value pair that can be edited.
For more modern and type-safe collection implementations, refer to the System.Collections.Generic namespace.