Atos-Syntel Interview Question

What is difference between IComparer and IComparable?

Interview Answer

Anonymous

Jul 27, 2009

The one is used to implement equality inside the object being compared while other takes 2 object arguments this can be very helpful to implement different comparison strategies.