1
Vote

Pair<TFirst, TSecond> should *not* implement IComparable, should implement IEquatable

description

The current IComparable implementation throws if the contained types fail to implement IComparable, which I believe to be a bad design (if that's the case, the argument should be required to implement IComparable)
 
It may be a good idea, though, to have Pair implement IEquatable<>, since Equals(Pair<TFirst, TSecond> other) already exists.

comments