/// <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 (MeasurementUnit != null) { hashCode = hashCode * 59 + MeasurementUnit.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Modifier != null) { hashCode = hashCode * 59 + Modifier.GetHashCode(); } if (GramWeight != null) { hashCode = hashCode * 59 + GramWeight.GetHashCode(); } if (DataPoints != null) { hashCode = hashCode * 59 + DataPoints.GetHashCode(); } if (Footnote != null) { hashCode = hashCode * 59 + Footnote.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 (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (PctWeight != null) { hashCode = hashCode * 59 + PctWeight.GetHashCode(); } if (GramWeight != null) { hashCode = hashCode * 59 + GramWeight.GetHashCode(); } if (IsRefuse != null) { hashCode = hashCode * 59 + IsRefuse.GetHashCode(); } if (DataPoints != null) { hashCode = hashCode * 59 + DataPoints.GetHashCode(); } return(hashCode); } }