System.Collections Namespace
Defines size, enumerators and synchronization methods for all collections.
The ICollection interface is the base interface for classes in the System.Collections namespace.
The ICollection interface extends IEnumerable.
IDictionary and IList are more specialized interfaces that are based on the ICollection interface.
- An IDictionary implementation is a collection of key-and-value pairs, like the Hashtable class.
- An IList implementation is a collection of values that can be sorted and whose members can be accessed by index, like the ArrayList class.
If neither the IDictionary interface nor the IList interface meet the requirements of the required collection, derive the new collection class from the ICollection interface instead for more flexibility.
Some collections that limit access to their elements, like the Queue class and the Stack class, directly implement the ICollection interface.
IDictionary Interface IEnumerable Interface IList Interface