示例#1
0
        /// <summary>
        /// Returns true if BankingCreditCardAccount instances are equal
        /// </summary>
        /// <param name="other">Instance of BankingCreditCardAccount to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(BankingCreditCardAccount other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     MinPaymentAmount == other.MinPaymentAmount ||
                     MinPaymentAmount != null &&
                     MinPaymentAmount.Equals(other.MinPaymentAmount)
                     ) &&
                 (
                     PaymentDueAmount == other.PaymentDueAmount ||
                     PaymentDueAmount != null &&
                     PaymentDueAmount.Equals(other.PaymentDueAmount)
                 ) &&
                 (
                     PaymentCurrency == other.PaymentCurrency ||
                     PaymentCurrency != null &&
                     PaymentCurrency.Equals(other.PaymentCurrency)
                 ) &&
                 (
                     PaymentDueDate == other.PaymentDueDate ||
                     PaymentDueDate != null &&
                     PaymentDueDate.Equals(other.PaymentDueDate)
                 ));
        }