/// <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 (Localizador != null) { hashCode = hashCode * 59 + Localizador.GetHashCode(); } if (Placa != null) { hashCode = hashCode * 59 + Placa.GetHashCode(); } if (IdCliente != null) { hashCode = hashCode * 59 + IdCliente.GetHashCode(); } if (Loja != null) { hashCode = hashCode * 59 + Loja.GetHashCode(); } if (Status != null) { hashCode = hashCode * 59 + Status.GetHashCode(); } if (IdPagamento != null) { hashCode = hashCode * 59 + IdPagamento.GetHashCode(); } return(hashCode); } }
protected override int GetHashCodeCore() { unchecked { var hashCode = Placa.GetHashCode(); hashCode = (hashCode * 397) ^ Kilometragem.GetHashCode(); hashCode = (hashCode * 397) ^ Portas.GetHashCode(); hashCode = (hashCode * 397) ^ Cambio.GetHashCode(); hashCode = (hashCode * 397) ^ Carroceria.GetHashCode(); hashCode = (hashCode * 397) ^ Cor.GetHashCode(); return(hashCode); } }
/// <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 (Placa != null) { hashCode = hashCode * 59 + Placa.GetHashCode(); } if (Descricao != null) { hashCode = hashCode * 59 + Descricao.GetHashCode(); } if (Loja != null) { hashCode = hashCode * 59 + Loja.GetHashCode(); } return(hashCode); } }