Ejemplo n.º 1
0
 public override bool Equals(object obj)
 {
     if (obj is Triplet <T1, T2, T3> )
     {
         Triplet <T1, T2, T3> rhs = (Triplet <T1, T2, T3>)obj;
         return(this.A.Equals(rhs.A) && this.B.Equals(rhs.B) && this.C.Equals(rhs.C));
     }
     return(false);
 }
Ejemplo n.º 2
0
        public int CompareTo(Triplet <T1, T2, T3> other)
        {
            int c = Comparer <T1> .Default.Compare(this.A, other.A);

            if (c == 0)
            {
                c = Comparer <T2> .Default.Compare(this.B, other.B);

                if (c == 0)
                {
                    c = Comparer <T3> .Default.Compare(this.C, other.C);
                }
            }
            return(c);
        }