Class Comparer<T>
Represents the comparer.
Implements
IComparer<T>
Inherited Members
Namespace: Platform.Comparers
Assembly: Platform.Comparers.dll
Syntax
public class Comparer<T> : IComparer<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceComparer(IComparer<T>)
Initializes a new Comparer instance.
Declaration
public Comparer(IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
IComparer<T> | comparer | A comparer.
|
Comparer(Func<T, T, Int32>)
Initializes a new Comparer instance.
Declaration
public Comparer(Func<T, T, int> compare)
Parameters
Type | Name | Description |
---|---|---|
Func<T, T, Int32> | compare | A compare.
|
Methods
| Improve this Doc View SourceCompare(T, T)
Compares the x.
Declaration
public int Compare(T x, T y)
Parameters
Type | Name | Description |
---|---|---|
T | x | The .
|
T | y | The .
|
Returns
Type | Description |
---|---|
Int32 | The int
|
Operators
| Improve this Doc View SourceImplicit(Comparer<T> to Func<T, T, Int32>)
Declaration
public static implicit operator Func<T, T, int>(Comparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
Comparer<T> | comparer |
Returns
Type | Description |
---|---|
Func<T, T, Int32> |
Implicit(Func<T, T, Int32> to Comparer<T>)
Declaration
public static implicit operator Comparer<T>(Func<T, T, int> compare)
Parameters
Type | Name | Description |
---|---|---|
Func<T, T, Int32> | compare |
Returns
Type | Description |
---|---|
Comparer<T> |
Implements
See Also
IComparer<T>