/// <summary> /// Returns true if Conta instances are equal /// </summary> /// <param name="other">Instance of Conta to be compared</param> /// <returns>Boolean</returns> public bool Equals(Conta other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Agencia == other.Agencia || Agencia != null && Agencia.Equals(other.Agencia) ) && ( Numero == other.Numero || Numero != null && Numero.Equals(other.Numero) ) && ( Digito == other.Digito || Digito != null && Digito.Equals(other.Digito) ) && ( Saldo == other.Saldo || Saldo != null && Saldo.Equals(other.Saldo) ) && ( Cliente == other.Cliente || Cliente != null && Cliente.Equals(other.Cliente) ) && ( Transacoes == other.Transacoes || Transacoes != null && Transacoes.SequenceEqual(other.Transacoes) )); }