public override int GetHashCode() { unchecked { var hashCode = (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Price; hashCode = (hashCode * 397) ^ (LinkUri != null ? LinkUri.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (AnnotationLayout != null) { hashCode = hashCode * 59 + AnnotationLayout.GetHashCode(); } hashCode = hashCode * 59 + LinkType.GetHashCode(); hashCode = hashCode * 59 + LinkPage.GetHashCode(); if (LinkUri != null) { hashCode = hashCode * 59 + LinkUri.GetHashCode(); } hashCode = hashCode * 59 + ShowBorder.GetHashCode(); if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } return(hashCode); } }