Delegate Comparer<T>
Represents a method that is used to comparer two item of type T regarding their ordering
public delegate int Comparer<T>(ref readonly T a, ref readonly T b) where T : unmanaged
Parameters
aTThe first item to compare
bTThe second item to compaer
Returns
- int
-1, ifashould be ordered beforeb;1, ifashould be ordered afterb; otherwise,0andaandbare consindered equal
Type Parameters
TThe type of items to compare
Remarks
If the two items a and b are equal (the return value of this method is 0), their order while sorting is undefined.