public override int GetHashCode() { return(37 ^ Id.GetHashCode() ^ AgencyId.GetHashCode() ^ Version.GetHashCode()); }
/// <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 (PersonId != null) { hashCode = hashCode * 59 + PersonId.GetHashCode(); } hashCode = hashCode * 59 + EngagementRoute.GetHashCode(); if (AgencyId != null) { hashCode = hashCode * 59 + AgencyId.GetHashCode(); } hashCode = hashCode * 59 + Cost.GetHashCode(); if (CancellationCosts != null) { hashCode = hashCode * 59 + CancellationCosts.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { var hashCode = AgencyId.GetHashCode(); hashCode = (hashCode * 397) ^ RouteId.GetHashCode(); hashCode = (hashCode * 397) ^ RouteType.GetHashCode(); hashCode = (hashCode * 397) ^ TripId.GetHashCode(); hashCode = (hashCode * 397) ^ StopId.GetHashCode(); 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 (AgencyId != null) { hashCode = hashCode * 59 + AgencyId.GetHashCode(); } if (AgencyName != null) { hashCode = hashCode * 59 + AgencyName.GetHashCode(); } hashCode = hashCode * 59 + Cost.GetHashCode(); return(hashCode); } }