Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     return(Composite4IntKey.ShiftAndWrap(this.Key_1.GetHashCode(), 8) ^
            Composite4IntKey.ShiftAndWrap(this.Key_2.GetHashCode(), 4) ^
            Composite4IntKey.ShiftAndWrap(this.Key_3.GetHashCode(), 2) ^
            this.Key_4.GetHashCode());
 }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (!(obj is Composite4IntKey))
            {
                return(false);
            }

            Composite4IntKey ck = obj as Composite4IntKey;

            return(this.Key_1 == ck.Key_1 && this.Key_2 == ck.Key_2 &&
                   this.Key_3 == ck.Key_3 && this.Key_4 == ck.Key_4);
        }