public int CompareTo(Triplet <T1, T2, T3> other) { int c = Comparer <T1> .Default.Compare(A, other.A); if (c == 0) { c = Comparer <T2> .Default.Compare(B, other.B); if (c == 0) { c = Comparer <T3> .Default.Compare(C, other.C); } } return(c); }
public bool Equals(Triplet <T1, T2, T3> rhs) { return(T1Comp.Equals(A, rhs.A) && T2Comp.Equals(B, rhs.B) && T3Comp.Equals(C, rhs.C)); }