コード例 #1
0
        public override bool Equals(Object other)
        {
            Triplet <T1, T2, T3> tmp = other as Triplet <T1, T2, T3>;

            if (tmp != null)
            {
                return(this.CompareTo(tmp) == 0);
            }
            return(((Object)this).Equals(other));
        }
コード例 #2
0
        public virtual int CompareTo(Triplet <T1, T2, T3> other)
        {
            int res = this.first.CompareTo(other.first);

            if (res == 0)
            {
                res = this.second.CompareTo(other.second);
            }
            if (res == 0)
            {
                return(this.third.CompareTo(other.third));
            }
            return(res);
        }
コード例 #3
0
 public virtual bool Equals(Triplet <T1, T2, T3> other)
 {
     return(this.CompareTo(other) == 0);
 }