/// <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 (Agencia != null) { hashCode = hashCode * 59 + Agencia.GetHashCode(); } if (Numero != null) { hashCode = hashCode * 59 + Numero.GetHashCode(); } if (Digito != null) { hashCode = hashCode * 59 + Digito.GetHashCode(); } if (Saldo != null) { hashCode = hashCode * 59 + Saldo.GetHashCode(); } if (Cliente != null) { hashCode = hashCode * 59 + Cliente.GetHashCode(); } if (Transacoes != null) { hashCode = hashCode * 59 + Transacoes.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hashCode = -1220008800; hashCode = hashCode * -1521134295 + Id.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Nome); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Telefone); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Cpf); hashCode = hashCode * -1521134295 + Saldo.GetHashCode(); hashCode = hashCode * -1521134295 + Limite.GetHashCode(); return(hashCode); }