Click or drag to resize
KeyValuePairTKey, TValue Structure
Defines a key/value pair that can be set or retrieved.

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public struct KeyValuePair<TKey, TValue>

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

The KeyValuePairTKey, TValue type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
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.)
Public methodToString
Returns a string representation of the KeyValuePairTKey, TValue, using the string representations of the key and value.
(Overrides ValueTypeToString.)
Top
Properties
  NameDescription
Public propertyKey
Gets the key in the key/value pair.
Public propertyValue
Gets the value in the key/value pair.
Top
See Also