System.Collections Namespace
This namespace contains interfaces and classes that define various collections of objects.
It includes non-generic collections like ArrayList and Hashtable, as well as interfaces that are foundational for generic collections.
These types are essential for managing groups of objects in a structured way, offering flexibility and efficiency for data storage and retrieval.
Classes and Interfaces
ICollection
Interface
Represents the base interface for all non-generic collection types. It provides common properties and methods for accessing the number of elements in a collection, whether it is synchronized, and copying elements to an array.
IEnumerable
Interface
Implements the enumerator, which supports a simple iteration over a non-generic collection.
ArrayList
Class
Represents a strongly-typed list of objects that can be accessed by index. Provides methods for creating, searching, and sorting lists. Unlike an array, an ArrayList can grow or shrink dynamically.
Hashtable
Class
Represents a collection of key and value pairs that are organized by hash code. This is a non-generic collection that stores objects of type Object.
IDictionary
Interface
Represents a collection of key/value pairs. The keys are used to access the values.
IEnumerator
Interface
Supports a simple iteration over a non-generic collection.
Stack
Class
Represents a LIFO (Last-In, First-Out) collection of objects. It is a non-generic collection.
Queue
Class
Represents a First-In, First-Out (FIFO) collection of objects. It is a non-generic collection.