/// <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 (StandardId != null) { hashCode = hashCode * 59 + StandardId.GetHashCode(); } if (IsOptional != null) { hashCode = hashCode * 59 + IsOptional.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns a suitable hash code for the identifier. /// </summary> /// <returns> the hash code </returns> public override int GetHashCode() { return(standardId.GetHashCode() + 7); }