// override object.GetHashCode public override int GetHashCode() { int hash = 11; hash = hash * 13 + Number1.GetHashCode(); hash = hash * 13 + Number2.GetHashCode(); hash = hash * 13 + Answer.GetHashCode(); hash = hash * 13 + Oper.GetHashCode(); return(hash); }
public override int GetHashCode() { unchecked { var hashCode = Number1.GetHashCode(); hashCode = (hashCode * 397) ^ Number2.GetHashCode(); hashCode = (hashCode * 397) ^ Number3.GetHashCode(); hashCode = (hashCode * 397) ^ (Numbers?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Dec1.GetHashCode(); hashCode = (hashCode * 397) ^ Dec2.GetHashCode(); hashCode = (hashCode * 397) ^ Date1.GetHashCode(); hashCode = (hashCode * 397) ^ Date2.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Number1.GetHashCode(); hashCode = (hashCode * 397) ^ Number2.GetHashCode(); hashCode = (hashCode * 397) ^ Number3; hashCode = (hashCode * 397) ^ Number4.GetHashCode(); hashCode = (hashCode * 397) ^ Number5.GetHashCode(); hashCode = (hashCode * 397) ^ Number6.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Number7; hashCode = (hashCode * 397) ^ Number8.GetHashCode(); // hashCode = (hashCode * 397) ^ Number9.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Number1 != 0) { hash ^= Number1.GetHashCode(); } if (Number2 != 0) { hash ^= Number2.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { // xor the hash codes of the elements used to evaluate // equality return(Number1.GetHashCode() ^ Number2.GetHashCode()); }