Exemple #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (!(obj is Quadruple <T1, T2, T3, T4>))
            {
                return(false);
            }
            Quadruple <T1, T2, T3, T4> other = (Quadruple <T1, T2, T3, T4>)obj;

            return(this.Equals(other));
        }
Exemple #2
0
        public bool Equals(Quadruple <T1, T2, T3, T4> other)
        {
            bool flag;
            bool flag2;
            bool flag3;
            bool flag4;

            if ((!Quadruple <T1, T2, T3, T4> .t1IsValueType && (this.first == null)) && (other.first == null))
            {
                flag = true;
            }
            else if (!Quadruple <T1, T2, T3, T4> .t1IsValueType && ((this.first == null) || (other.first == null)))
            {
                flag = false;
            }
            else
            {
                flag = this.first.Equals(other.first);
            }
            if (!flag)
            {
                return(false);
            }
            if ((!Quadruple <T1, T2, T3, T4> .t2IsValueType && (this.second == null)) && (other.second == null))
            {
                flag2 = true;
            }
            else if (!Quadruple <T1, T2, T3, T4> .t2IsValueType && ((this.second == null) || (other.second == null)))
            {
                flag2 = false;
            }
            else
            {
                flag2 = this.second.Equals(other.second);
            }
            if (!flag2)
            {
                return(false);
            }
            if ((!Quadruple <T1, T2, T3, T4> .t3IsValueType && (this.third == null)) && (other.third == null))
            {
                flag3 = true;
            }
            else if (!Quadruple <T1, T2, T3, T4> .t3IsValueType && ((this.third == null) || (other.third == null)))
            {
                flag3 = false;
            }
            else
            {
                flag3 = this.third.Equals(other.third);
            }
            if (!flag3)
            {
                return(false);
            }
            if ((!Quadruple <T1, T2, T3, T4> .t4IsValueType && (this.fourth == null)) && (other.fourth == null))
            {
                flag4 = true;
            }
            else if (!Quadruple <T1, T2, T3, T4> .t4IsValueType && ((this.fourth == null) || (other.fourth == null)))
            {
                flag4 = false;
            }
            else
            {
                flag4 = this.fourth.Equals(other.fourth);
            }
            return(((flag & flag2) & flag3) & flag4);
        }