Table of Contents

Class IdComparer

Namespace
AlgorithmsSW.Object
Assembly
AlgorithmsSW.dll
public class IdComparer : Comparer<IIdeable>, IComparer<IIdeable>, IComparer
Inheritance
IdComparer
Implements
Inherited Members
Extension Methods

Fields

Instance

public static readonly IdComparer Instance

Field Value

IdComparer

Methods

Compare(IIdeable?, IIdeable?)

When overridden in a derived class, performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other.

public override int Compare(IIdeable? x, IIdeable? y)

Parameters

x IIdeable

The first object to compare.

y IIdeable

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.

Exceptions

ArgumentException

Type T does not implement either the IComparable<T> generic interface or the IComparable interface.