Table of Contents

Class EntryValueComparer<TKey, TValue>

Namespace
Garyon.Objects
Assembly
Garyon.dll

Represents a KeyValuePair<TKey, TValue> comparer, where the result only relies on the comparison result between the values.

public sealed class EntryValueComparer<TKey, TValue> : IKeyValuePairComparer<TKey, TValue>, IComparer<KeyValuePair<TKey, TValue>> where TValue : IComparable<TValue>

Type Parameters

TKey

The type of the key.

TValue

The type of the value.

Inheritance
EntryValueComparer<TKey, TValue>
Implements
IKeyValuePairComparer<TKey, TValue>
IComparer<KeyValuePair<TKey, TValue>>
Inherited Members
Extension Methods

Fields

Default

The default instance of the EntryValueComparer<TKey, TValue> class.

public static readonly EntryValueComparer<TKey, TValue> Default

Field Value

EntryValueComparer<TKey, TValue>

Methods

Compare(KeyValuePair<TKey, TValue>, KeyValuePair<TKey, TValue>)

Compares two KeyValuePair<TKey, TValue> instances given this comparer's rules.

public int Compare(KeyValuePair<TKey, TValue> left, KeyValuePair<TKey, TValue> right)

Parameters

left KeyValuePair<TKey, TValue>

The left value to compare.

right KeyValuePair<TKey, TValue>

The right value to compare.

Returns

int

The comparison result between the values. For the comparison, order is matched.