Namespace: System.Collections.Generic
KeyValuePair<TKey, TValue>
Defines a key/value pair that can be set or retrieved.
Properties (2)
TKey Key
Gets the key in the key/value pair.
Value: A TKey that is the key of the KeyValuePair.
TValue Value
Gets the value in the key/value pair.
Value: A TValue that is the value of the KeyValuePair.
Methods (1)
KeyValuePair<TKey, TValue>(T,TValue)Constructor
Initializes a new instance of the KeyValuePair structure with the specified key and value.
| Parameter | Description |
|---|---|
| key | The object defined in each key/value pair. |
| value | The definition associated with key. |