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
-
objectDefaultComparer<T>
- Implements
-
IComparer<T>
- Extension Methods
Fields
Instance
A singleton instance of the comparer.
public static readonly DefaultComparer<T> Instance
Field Value
Methods
Compare(T?, T?)
public int Compare(T? x, T? y)
Parameters
xTyT