System.Collections.DictionaryBase Class

Provides the abstract base class for a strongly typed collection of key/value pairs.

See Also: DictionaryBase Members


public abstract class DictionaryBase : IDictionary


The foreach statement of the C# language (for each in Visual Basic) requires the type of each element in the collection. Since each element of the DictionaryBase is a key/value pair, the element type is not the type of the key or the type of the value. Instead, the element type is DictionaryEntry.

The foreach statement is a wrapper around the enumerator, which only allows reading from, not writing to, the collection.


Because keys can be inherited and their behavior changed, their absolute uniqueness cannot be guaranteed by comparisons using the Type.Equals(object) method.


Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,