Collection Interfaces
The collection classes have many methods in common, which make them more predictable and easier to program because of their consistency. This consistency is maintained by the use of specialized collection interfaces. Table 26.1 details the interfaces implemented by collection classes.
Interface Name | Description |
---|---|
ICollection | Enumerator, size, and synchronization for all collections |
IComparer | Compares two objects |
IDictionary | Key/value pair collection |
IDictionaryEnumerator | Enumerator for IDictionary |
IEnumerable | Gets an enumerator |
IHashCodeProvider | Obtains a hash code |
IList | Indexed collection |
Collections implement one or more of these collection interfaces. The interface they implement will depend upon the type ...
Get C# Unleashed 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.