/// <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 (Bsb != null) { hashCode = hashCode * 59 + Bsb.GetHashCode(); } if (AccountNumber != null) { hashCode = hashCode * 59 + AccountNumber.GetHashCode(); } if (BundleName != null) { hashCode = hashCode * 59 + BundleName.GetHashCode(); } if (SpecificAccountUType != null) { hashCode = hashCode * 59 + SpecificAccountUType.GetHashCode(); } if (TermDeposit != null) { hashCode = hashCode * 59 + TermDeposit.GetHashCode(); } if (CreditCard != null) { hashCode = hashCode * 59 + CreditCard.GetHashCode(); } if (Loan != null) { hashCode = hashCode * 59 + Loan.GetHashCode(); } if (Features != null) { hashCode = hashCode * 59 + Features.GetHashCode(); } if (Fees != null) { hashCode = hashCode * 59 + Fees.GetHashCode(); } if (DepositRates != null) { hashCode = hashCode * 59 + DepositRates.GetHashCode(); } if (LendingRates != null) { hashCode = hashCode * 59 + LendingRates.GetHashCode(); } if (Address != null) { hashCode = hashCode * 59 + Address.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if BankingAccountDetail instances are equal /// </summary> /// <param name="other">Instance of BankingAccountDetail to be compared</param> /// <returns>Boolean</returns> public bool Equals(BankingAccountDetail other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Bsb == other.Bsb || Bsb != null && Bsb.Equals(other.Bsb) ) && ( AccountNumber == other.AccountNumber || AccountNumber != null && AccountNumber.Equals(other.AccountNumber) ) && ( BundleName == other.BundleName || BundleName != null && BundleName.Equals(other.BundleName) ) && ( SpecificAccountUType == other.SpecificAccountUType || SpecificAccountUType != null && SpecificAccountUType.Equals(other.SpecificAccountUType) ) && ( TermDeposit == other.TermDeposit || TermDeposit != null && TermDeposit.Equals(other.TermDeposit) ) && ( CreditCard == other.CreditCard || CreditCard != null && CreditCard.Equals(other.CreditCard) ) && ( Loan == other.Loan || Loan != null && Loan.Equals(other.Loan) ) && ( Features == other.Features || Features != null && Features.SequenceEqual(other.Features) ) && ( Fees == other.Fees || Fees != null && Fees.SequenceEqual(other.Fees) ) && ( DepositRates == other.DepositRates || DepositRates != null && DepositRates.SequenceEqual(other.DepositRates) ) && ( LendingRates == other.LendingRates || LendingRates != null && LendingRates.SequenceEqual(other.LendingRates) ) && ( Address == other.Address || Address != null && Address.Equals(other.Address) )); }