System.Collections.Generic Namespace

 

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.

ClassDescription
System_CAPS_pubclassComparer<T>

Provides a base class for implementations of the IComparer<T> generic interface.

System_CAPS_pubclassDictionary<TKey, TValue>

Represents a collection of keys and values.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclassEqualityComparer<T>

Provides a base class for implementations of the IEqualityComparer<T> generic interface.

System_CAPS_pubclassHashSet<T>

Represents a set of values.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclassDictionary<TKey, TValue>.KeyCollection

Represents the collection of keys in a Dictionary<TKey, TValue>. This class cannot be inherited.

System_CAPS_pubclassSortedDictionary<TKey, TValue>.KeyCollection

Represents the collection of keys in a SortedDictionary<TKey, TValue>. This class cannot be inherited.

System_CAPS_pubclassKeyedByTypeCollection<TItem>

Provides a collection whose items are types that serve as keys.

System_CAPS_pubclassKeyNotFoundException

The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.

System_CAPS_pubclassLinkedList<T>

Represents a doubly linked list.

System_CAPS_pubclassLinkedListNode<T>

Represents a node in a LinkedList<T>. This class cannot be inherited.

System_CAPS_pubclassList<T>

Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclassQueue<T>

Represents a first-in, first-out collection of objects.

System_CAPS_pubclassSortedDictionary<TKey, TValue>

Represents a collection of key/value pairs that are sorted on the key.

System_CAPS_pubclassSortedList<TKey, TValue>

Represents a collection of key/value pairs that are sorted by key based on the associated IComparer<T> implementation.

System_CAPS_pubclassSortedSet<T>

Represents a collection of objects that is maintained in sorted order.

System_CAPS_pubclassStack<T>

Represents a variable size last-in-first-out (LIFO) collection of instances of the same specified type.

System_CAPS_pubclassSynchronizedCollection<T>

Provides a thread-safe collection that contains objects of a type specified by the generic parameter as elements.

System_CAPS_pubclassSynchronizedKeyedCollection<K, T>

Provides a thread-safe collection that contains objects of a type specified by a generic parameter and that are grouped by keys.

System_CAPS_pubclassSynchronizedReadOnlyCollection<T>

Provides a thread-safe, read-only collection that contains objects of a type specified by the generic parameter as elements.

System_CAPS_pubclassDictionary<TKey, TValue>.ValueCollection

Represents the collection of values in a Dictionary<TKey, TValue>. This class cannot be inherited.

System_CAPS_pubclassSortedDictionary<TKey, TValue>.ValueCollection

Represents the collection of values in a SortedDictionary<TKey, TValue>. This class cannot be inherited

InterfaceDescription
System_CAPS_pubinterfaceICollection<T>

Defines methods to manipulate generic collections.

System_CAPS_pubinterfaceIComparer<T>

Defines a method that a type implements to compare two objects.

System_CAPS_pubinterfaceIDictionary<TKey, TValue>

Represents a generic collection of key/value pairs.

System_CAPS_pubinterfaceIEnumerable<T>

Exposes the enumerator, which supports a simple iteration over a collection of a specified type.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubinterfaceIEnumerator<T>

Supports a simple iteration over a generic collection.

System_CAPS_pubinterfaceIEqualityComparer<T>

Defines methods to support the comparison of objects for equality.

System_CAPS_pubinterfaceIList<T>

Represents a collection of objects that can be individually accessed by index.

System_CAPS_pubinterfaceIReadOnlyCollection<T>

Represents a strongly-typed, read-only collection of elements.

System_CAPS_pubinterfaceIReadOnlyDictionary<TKey, TValue>

Represents a generic read-only collection of key/value pairs.

System_CAPS_pubinterfaceIReadOnlyList<T>

Represents a read-only collection of elements that can be accessed by index.

System_CAPS_pubinterfaceISet<T>

Provides the base interface for the abstraction of sets.

Many of the generic collection types are direct analogs of nongeneric types. Dictionary<TKey, TValue> is a generic version of Hashtable; it uses the generic structure KeyValuePair<TKey, TValue> for enumeration instead of DictionaryEntry. List<T> is a generic version of ArrayList. There are generic Queue<T> and Stack<T> classes that correspond to the nongeneric versions. There are generic and nongeneric versions of SortedList<TKey, TValue>. Both versions are hybrids of a dictionary and a list. The SortedDictionary<TKey, TValue> generic class is a pure dictionary and has no nongeneric counterpart. The LinkedList<T> generic class is a true linked list and has no nongeneric counterpart.

Return to top
Show: