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