public delegate int Comparison<T>(T x, T y);
Object
Delegate
Comparison<T>This type implements ICloneable.
mscorlib
BCL
Represents the method that compares two objects of the same type.
- x
- The first object to compare.
- y
- The second object to compare.
A Int32 containing a value that reflects the sort order of the objects.
Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y.
[Note: This delegate is used by the method System.Array.Sort(T[], Comparison<T>)(T[], Comparison<T>)
, and in System.Collections.Generic.List<T> to sort the elements of the collection.]
System Namespace