/// <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 (ExternalSystemCode != null) { hashCode = hashCode * 59 + ExternalSystemCode.GetHashCode(); } if (Inn != null) { hashCode = hashCode * 59 + Inn.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if BaseParams instances are equal /// </summary> /// <param name="other">Instance of BaseParams to be compared</param> /// <returns>Boolean</returns> public bool Equals(BaseParams other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ExternalSystemCode == other.ExternalSystemCode || ExternalSystemCode != null && ExternalSystemCode.Equals(other.ExternalSystemCode) ) && ( Inn == other.Inn || Inn != null && Inn.Equals(other.Inn) )); }