/// <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 (Title != null) { hashCode = hashCode * 59 + Title.GetHashCode(); } if (Tooltip != null) { hashCode = hashCode * 59 + Tooltip.GetHashCode(); } if (FixedWidth != null) { hashCode = hashCode * 59 + FixedWidth.GetHashCode(); } if (Sortable != null) { hashCode = hashCode * 59 + Sortable.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Family != null?Family.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Weight != null ? Weight.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Italics.GetHashCode(); hashCode = (hashCode * 397) ^ Size.GetHashCode(); hashCode = (hashCode * 397) ^ FixedWidth.GetHashCode(); return(hashCode); } }