Class DefaultComparer<T>
Compares objects using their IComparable implementation.
Namespace: NanoByte.Common.Collections
Assembly: NanoByte.Common.dll
Syntax
public sealed class DefaultComparer<T> : Object where T : IComparable<T>
Type Parameters
Name | Description |
---|---|
T |
Fields
Instance
A singleton instance of the comparer.
Declaration
public static readonly DefaultComparer<T> Instance
Field Value
Type | Description |
---|---|
DefaultComparer<T> |
Methods
Compare(T, T)
Declaration
public int Compare(T x, T y)
Parameters
Type | Name | Description |
---|---|---|
T | x | |
T | y |
Returns
Type | Description |
---|---|
Int32 |