public bool Equals([AllowNull] BankAccount other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(BankCode.Equals(other.BankCode) && AccountId.Equals(other.AccountId) && Type.Equals(other.Type)); }
/// <summary> /// Returns true if BankAccountBban instances are equal /// </summary> /// <param name="other">Instance of BankAccountBban to be compared</param> /// <returns>Boolean</returns> public bool Equals(BankAccountBban other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AccountNumber == other.AccountNumber || AccountNumber != null && AccountNumber.Equals(other.AccountNumber) ) && ( BankCode == other.BankCode || BankCode != null && BankCode.Equals(other.BankCode) ) && ( BankName == other.BankName || BankName != null && BankName.Equals(other.BankName) ) && ( BranchCode == other.BranchCode || BranchCode != null && BranchCode.Equals(other.BranchCode) ) && ( CheckDigit == other.CheckDigit || CheckDigit != null && CheckDigit.Equals(other.CheckDigit) ) && ( CountryCode == other.CountryCode || CountryCode != null && CountryCode.Equals(other.CountryCode) )); }