The IComparer interface supports a method that compares two objects. It is used in conjunction with the Sort and BinarySearch methods on the Array and List classes
public interface IComparer { //Methods int Compare(object x, object y); }
Comparer is a default implementation of the IComparer interface that compares two Objects that implement the ICompareable interface
public class Comparer: IComparer { //Fields public static readonly Comparer Default; //Methods public virtual int Compare(object a, object b); }