The System.Collections.Generic namespace contains interfaces and classes that define generic collections, which allow users to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections.
Classes
| Class | Description | |
|---|---|---|
![]() | Comparer | Provides a base class for implementations of the IComparer |
![]() | Dictionary | Represents a collection of keys and values. |
![]() | Dictionary | Represents the collection of keys in a Dictionary |
![]() | Dictionary | Represents the collection of values in a Dictionary |
![]() | EqualityComparer | Provides a base class for implementations of the IEqualityComparer |
![]() | HashSet | Represents a set of values. |
![]() | KeyedByTypeCollection | Provides a collection whose items are types that serve as keys. |
![]() | KeyNotFoundException | The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection. |
![]() | LinkedList | Represents a doubly linked list. |
![]() | LinkedListNode | Represents a node in a LinkedList |
![]() | List | Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists. |
![]() | Queue | Represents a first-in, first-out collection of objects. |
![]() | SortedDictionary | Represents a collection of key/value pairs that are sorted on the key. |
![]() | SortedDictionary | Represents the collection of keys in a SortedDictionary |
![]() | SortedDictionary | Represents the collection of values in a SortedDictionary |
![]() | SortedList | Represents a collection of key/value pairs that are sorted by key based on the associated IComparer |
![]() | SortedSet | Represents a collection of objects that is maintained in sorted order. |
![]() | Stack | Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type. |
![]() | SynchronizedCollection | Provides a thread-safe collection that contains objects of a type specified by the generic parameter as elements. |
![]() | SynchronizedKeyedCollection | Provides a thread-safe collection that contains objects of a type specified by a generic parameter and that are grouped by keys. |
![]() | SynchronizedReadOnlyCollection | Provides a thread-safe, read-only collection that contains objects of a type specified by the generic parameter as elements. |
Structures
Interfaces
| Interface | Description | |
|---|---|---|
![]() | ICollection | Defines methods to manipulate generic collections. |
![]() | IComparer | Defines a method that a type implements to compare two objects. |
![]() | IDictionary | Represents a generic collection of key/value pairs. |
![]() | IEnumerable | Exposes the enumerator, which supports a simple iteration over a collection of a specified type. |
![]() | IEnumerator | Supports a simple iteration over a generic collection. |
![]() | IEqualityComparer | Defines methods to support the comparison of objects for equality. |
![]() | IList | Represents a collection of objects that can be individually accessed by index. |
![]() | ISet | Provides the base interface for the abstraction of sets. |
.gif)
.gif)
.gif)