![]() | Pair<TKey, TValue> Class |
public sealed class Pair<TKey, TValue> : IWritable, IComparable<Pair<TKey, TValue>>, IEquatable<Pair<TKey, TValue>>, ICloneable
The Pair<TKey, TValue> type exposes the following members.
Name | Description | |
---|---|---|
![]() | Pair<TKey, TValue>() | Initializes a new instance of the Pair<TKey, TValue> class. |
![]() | Pair<TKey, TValue>(TKey, TValue) | Initializes a new instance of the Pair<TKey, TValue> class with the specified key and value. |
Name | Description | |
---|---|---|
![]() | Key | Gets or sets the key in the key/value pair. |
![]() | Value | Gets or sets the value in the key/value pair. |
Name | Description | |
---|---|---|
![]() | CompareTo | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. |
![]() | Equals(Object) |
Determines whether the specified Object is equal to the current Pair<TKey, TValue>.
(Overrides Object.Equals(Object)) |
![]() | Equals(Pair<TKey, TValue>) | Determines whether the specified Pair<TKey, TValue> is equal to the current Pair<TKey, TValue>. |
![]() | GetHashCode |
Serves as a hash function for a particular type.
(Overrides Object.GetHashCode()) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() | Read | Reads the object from the specified reader. |
![]() | ToString |
Gets a string representation of the current Pair<TKey, TValue>.
(Overrides Object.ToString()) |
![]() | Write | Writes the object to the specified writer. |
Name | Description | |
---|---|---|
![]() ![]() | Equality(Pair<TKey, TValue>, Pair<TKey, TValue>) | Determines whether two specified Pair<TKey, TValue> objects have the same value. |
![]() ![]() | GreaterThan(Pair<TKey, TValue>, Pair<TKey, TValue>) | Determines whether one specified Pair<TKey, TValue> is greater than another specified Pair<TKey, TValue> |
![]() ![]() | GreaterThanOrEqual(Pair<TKey, TValue>, Pair<TKey, TValue>) | Determines whether one specified Pair<TKey, TValue> is greater than or equal to another specified Pair<TKey, TValue> |
![]() ![]() | Inequality(Pair<TKey, TValue>, Pair<TKey, TValue>) | Determines whether two specified Pair<TKey, TValue> objects have different values. |
![]() ![]() | LessThan(Pair<TKey, TValue>, Pair<TKey, TValue>) | Determines whether one specified Pair<TKey, TValue> is less than another specified Pair<TKey, TValue> |
![]() ![]() | LessThanOrEqual(Pair<TKey, TValue>, Pair<TKey, TValue>) | Determines whether one specified Pair<TKey, TValue> is less than or equal to another specified Pair<TKey, TValue> |
Jumbo does not support the use of KeyValuePair<TKey, TValue> as a record type. You must use Pair<TKey, TValue> instead.
The IComparable<T> implementation of this class uses the key only; it ignores the value. IEquatable<T> does use both the key and value.