public delegate int Comparison<T>(T x, T y);
This type implements ICloneable.
Represents the method that compares two objects of the same type.
- The first object to compare.
- 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.