Table of Contents

Class PairComparer<TKey, TValue>

Namespace
AlgorithmsSW.SymbolTable
Assembly
AlgorithmsSW.dll
public sealed class PairComparer<TKey, TValue> : IComparer<KeyValuePair<TKey, TValue>>

Type Parameters

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

Constructors

PairComparer(IComparer<TKey>)

public PairComparer(IComparer<TKey> comparer)

Parameters

comparer IComparer<TKey>

Methods

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

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

public int Compare(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y)

Parameters

x KeyValuePair<TKey, TValue>

The first object to compare.

y KeyValuePair<TKey, TValue>

The second object to compare.

Returns

int

A signed integer that indicates the relative values of x and y, as shown in the following table.

Value Meaning
Less than zerox is less than y.
Zerox equals y.
Greater than zerox is greater than y.