/// <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 (FirstName != null) { hashCode = hashCode * 59 + FirstName.GetHashCode(); } if (LastName != null) { hashCode = hashCode * 59 + LastName.GetHashCode(); } if (DateOfBirth != null) { hashCode = hashCode * 59 + DateOfBirth.GetHashCode(); } if (PlaceOfBirth != null) { hashCode = hashCode * 59 + PlaceOfBirth.GetHashCode(); } if (NationalIdNumber != null) { hashCode = hashCode * 59 + NationalIdNumber.GetHashCode(); } if (NationalIdType != null) { hashCode = hashCode * 59 + NationalIdType.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if UserDetailsInfo instances are equal /// </summary> /// <param name="other">Instance of UserDetailsInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(UserDetailsInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( DateOfBirth == other.DateOfBirth || DateOfBirth != null && DateOfBirth.Equals(other.DateOfBirth) ) && ( PlaceOfBirth == other.PlaceOfBirth || PlaceOfBirth != null && PlaceOfBirth.Equals(other.PlaceOfBirth) ) && ( NationalIdNumber == other.NationalIdNumber || NationalIdNumber != null && NationalIdNumber.Equals(other.NationalIdNumber) ) && ( NationalIdType == other.NationalIdType || NationalIdType != null && NationalIdType.Equals(other.NationalIdType) ) && ( PrimaryCitizenshipId == other.PrimaryCitizenshipId || PrimaryCitizenshipId != null && PrimaryCitizenshipId.Equals(other.PrimaryCitizenshipId) ) && ( PrimaryAddressId == other.PrimaryAddressId || PrimaryAddressId != null && PrimaryAddressId.Equals(other.PrimaryAddressId) )); }
/// <summary> /// Returns true if SessionsModel3 instances are equal /// </summary> /// <param name="other">Instance of SessionsModel3 to be compared</param> /// <returns>Boolean</returns> public bool Equals(SessionsModel3 other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( DateOfBirth == other.DateOfBirth || DateOfBirth != null && DateOfBirth.Equals(other.DateOfBirth) ) && ( PlaceOfBirth == other.PlaceOfBirth || PlaceOfBirth != null && PlaceOfBirth.Equals(other.PlaceOfBirth) ) && ( NationalIdNumber == other.NationalIdNumber || NationalIdNumber != null && NationalIdNumber.Equals(other.NationalIdNumber) ) && ( NationalIdType == other.NationalIdType || NationalIdType != null && NationalIdType.Equals(other.NationalIdType) )); }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (BirthDate == default(DateTime) ? 0 : BirthDate.GetHashCode()); hash = hash * 23 + (BusinessEntityId == default(int) ? 0 : BusinessEntityId.GetHashCode()); hash = hash * 23 + (CurrentFlag == default(bool) ? 0 : CurrentFlag.GetHashCode()); hash = hash * 23 + (Gender == null ? 0 : Gender.GetHashCode()); hash = hash * 23 + (HireDate == default(DateTime) ? 0 : HireDate.GetHashCode()); hash = hash * 23 + (JobTitle == null ? 0 : JobTitle.GetHashCode()); hash = hash * 23 + (LoginId == null ? 0 : LoginId.GetHashCode()); hash = hash * 23 + (MaritalStatus == null ? 0 : MaritalStatus.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (NationalIdNumber == null ? 0 : NationalIdNumber.GetHashCode()); hash = hash * 23 + (OrganizationLevel == null ? 0 : OrganizationLevel.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); hash = hash * 23 + (SalariedFlag == default(bool) ? 0 : SalariedFlag.GetHashCode()); hash = hash * 23 + (SickLeaveHours == default(short) ? 0 : SickLeaveHours.GetHashCode()); hash = hash * 23 + (VacationHours == default(short) ? 0 : VacationHours.GetHashCode()); return(hash); } }