public override int GetHashCode() { unchecked { var hashCode = Name.GetHashCode(); hashCode = (hashCode * 397) ^ Initials.GetHashCode(); hashCode = (hashCode * 397) ^ Id; return(hashCode); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + ContactId.GetHashCode(); if (GivenName != null) { hash = hash * 59 + GivenName.GetHashCode(); } if (Surname != null) { hash = hash * 59 + Surname.GetHashCode(); } hash = hash * 59 + Active.GetHashCode(); if (Initials != null) { hash = hash * 59 + Initials.GetHashCode(); } if (Email != null) { hash = hash * 59 + Email.GetHashCode(); } if (SmUserId != null) { hash = hash * 59 + SmUserId.GetHashCode(); } if (AccountId != null) { hash = hash * 59 + AccountId.GetHashCode(); } if (UserType != null) { hash = hash * 59 + UserType.GetHashCode(); } if (UserRoles != null) { hash = hash * 59 + UserRoles.GetHashCode(); } return(hash); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); hash = hash * 59 + Active.GetHashCode(); if (GivenName != null) { hash = hash * 59 + GivenName.GetHashCode(); } if (Surname != null) { hash = hash * 59 + Surname.GetHashCode(); } if (Initials != null) { hash = hash * 59 + Initials.GetHashCode(); } if (Email != null) { hash = hash * 59 + Email.GetHashCode(); } if (Permissions != null) { hash = hash * 59 + Permissions.GetHashCode(); } return(hash); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (GivenName != null) { hash = hash * 59 + GivenName.GetHashCode(); } if (Surname != null) { hash = hash * 59 + Surname.GetHashCode(); } hash = hash * 59 + Active.GetHashCode(); if (Initials != null) { hash = hash * 59 + Initials.GetHashCode(); } if (Email != null) { hash = hash * 59 + Email.GetHashCode(); } if (SmUserId != null) { hash = hash * 59 + SmUserId.GetHashCode(); } if (Guid != null) { hash = hash * 59 + Guid.GetHashCode(); } if (SmAuthorizationDirectory != null) { hash = hash * 59 + SmAuthorizationDirectory.GetHashCode(); } if (UserRoles != null) { hash = hash * 59 + UserRoles.GetHashCode(); } if (District != null) { hash = hash * 59 + District.GetHashCode(); } if (UserDistricts != null) { hash = hash * 59 + UserDistricts.GetHashCode(); } return(hash); } }