The KeyValuePair type exposes the following members.

Constructors

  NameDescription
Public methodKeyValuePair
Creates a new KeyValuePair structure with the key and value set to the parameters supplied

Methods

  NameDescription
Public methodEquals
Compares the supplied KeyValuePair object with this one.
(Overrides ValueType..::..Equals(Object).)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Gets a hash value that will represent this KeyValuePair object.
(Overrides ValueType..::..GetHashCode()()()().)
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 methodSetBoth
Sets both the key and the value properties at once
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)

Operators

  NameDescription
Public operatorStatic memberEquality
Compares to KeyValuePair objects and returns a bool value indicating whether or not they represent the same information.
Public operatorStatic memberInequality
Compares to KeyValuePair objects and returns a bool value indicating whether or not they represent different information.

Properties

  NameDescription
Public propertyKey
Gets or sets the key used to represent the value
Public propertyValue
Gets or sets the value represented by the key

See Also