public override int GetHashCode() { int hash = 1; if (Surname.Length != 0) { hash ^= Surname.GetHashCode(); } if (Forename.Length != 0) { hash ^= Forename.GetHashCode(); } hash ^= otherNames_.GetHashCode(); if (Salutation.Length != 0) { hash ^= Salutation.GetHashCode(); } if (Suffix.Length != 0) { hash ^= Suffix.GetHashCode(); } if (DisplayName.Length != 0) { hash ^= DisplayName.GetHashCode(); } if (Gender != global::PKIo.Gender.NotKnown) { hash ^= Gender.GetHashCode(); } if (dateOfBirth_ != null) { hash ^= DateOfBirth.GetHashCode(); } if (EmailAddress.Length != 0) { hash ^= EmailAddress.GetHashCode(); } if (MobileNumber.Length != 0) { hash ^= MobileNumber.GetHashCode(); } if (ExternalId.Length != 0) { hash ^= ExternalId.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (StaffNumber != null) { hashCode = hashCode * 59 + StaffNumber.GetHashCode(); } if (Forenames != null) { hashCode = hashCode * 59 + Forenames.GetHashCode(); } if (Surname != null) { hashCode = hashCode * 59 + Surname.GetHashCode(); } if (MobileNumber != null) { hashCode = hashCode * 59 + MobileNumber.GetHashCode(); } if (Grade != null) { hashCode = hashCode * 59 + Grade.GetHashCode(); } if (GradeType != null) { hashCode = hashCode * 59 + GradeType.GetHashCode(); } if (GradeTypeCategory != null) { hashCode = hashCode * 59 + GradeTypeCategory.GetHashCode(); } hashCode = hashCode * 59 + WTE.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { return(MobileNumber.GetHashCode() ^ HomeNumber.GetHashCode()); }