The KeyValuePair type exposes the following members.

Constructors

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

Methods

  NameDescription
Equals
Compares the supplied KeyValuePair object with this one.
(Overrides ValueType..::.Equals(Object).)
Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode
Gets a hash value that will represent this KeyValuePair object.
(Overrides ValueType..::.GetHashCode()()().)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
SetBoth
Sets both the key and the value properties at once
ToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)

Operators

  NameDescription
Equality
Compares to KeyValuePair objects and returns a bool value indicating whether or not they represent the same information.
Inequality
Compares to KeyValuePair objects and returns a bool value indicating whether or not they represent different information.

Properties

  NameDescription
Key
Gets or sets the key used to represent the value
Value
Gets or sets the value represented by the key

See Also