public override int GetHashCode() { unchecked { return((PatientId.GetHashCode() * 397) ^ SequenceNumber); } }
public override int GetHashCode() { unchecked { var hashCode = (PatientId != null ? PatientId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PlansAndPlanSumsInScope != null ? PlansAndPlanSumsInScope.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ActivePlan != null ? ActivePlan.GetHashCode() : 0); return(hashCode); } }
/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (PatientId != null) { hashCode = hashCode * 59 + PatientId.GetHashCode(); } if (Since != null) { hashCode = hashCode * 59 + Since.GetHashCode(); } if (Estimated != null) { hashCode = hashCode * 59 + Estimated.GetHashCode(); } if (EstimatedDurationMinutes != null) { hashCode = hashCode * 59 + EstimatedDurationMinutes.GetHashCode(); } if (Condition != null) { hashCode = hashCode * 59 + Condition.GetHashCode(); } return(hashCode); } }