Click or drag to resize
DictionaryTKey, TValue Class
Represents a collection of keys and values.
Inheritance Hierarchy
SystemObject
  System.Collections.GenericDictionaryTKey, TValue

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>, 
	ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
	IDictionary, ICollection, IEnumerable, ISerializable, IDeserializationCallback

Type Parameters

TKey
The type of the keys in the dictionary.
TValue
The type of the values in the dictionary.

The DictionaryTKey, TValue type exposes the following members.

Methods
  NameDescription
Public methodAdd
Adds the specified key and value to the dictionary.
Public methodClear
Removes all keys and values from the DictionaryTKey, TValue.
Public methodContainsKey
Determines whether the DictionaryTKey, TValue contains the specified key.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the DictionaryTKey, TValue.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Removes the value with the specified key from the DictionaryTKey, TValue.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetValue
Gets the value associated with the specified key.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of key/value pairs contained in the DictionaryTKey, TValue.
Public propertyKeys
Gets a collection containing the keys in the DictionaryTKey, TValue.
Public propertyValues
Gets a collection containing the values in the DictionaryTKey, TValue.
Top
See Also