public override int GetHashCode() { unchecked { var hashCode = Rel?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (Href?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Title?.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 (Rel != null) { hashCode = hashCode * 59 + Rel.GetHashCode(); } if (Href != null) { hashCode = hashCode * 59 + Href.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { return(base.GetHashCode() ^ (Rel != null? Rel.GetHashCode() : 1) ^ (Attributes != null? Attributes.GetHashCode() : 1)); }