Table of Contents

Class DefaultComparer<T>

Namespace
NanoByte.Common.Collections
Assembly
NanoByte.Common.dll

Compares objects using their IComparable implementation.

public sealed class DefaultComparer<T> : IComparer<T> where T : IComparable<T>

Type Parameters

T
Inheritance
object
DefaultComparer<T>
Implements
Extension Methods

Fields

Instance

A singleton instance of the comparer.

public static readonly DefaultComparer<T> Instance

Field Value

DefaultComparer<T>

Methods

Compare(T?, T?)

public int Compare(T? x, T? y)

Parameters

x T
y T

Returns

int