/// <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 (Isbn != null) { hashCode = hashCode * 59 + Isbn.GetHashCode(); } if (Titulo != null) { hashCode = hashCode * 59 + Titulo.GetHashCode(); } if (Autor != null) { hashCode = hashCode * 59 + Autor.GetHashCode(); } if (Genero != null) { hashCode = hashCode * 59 + Genero.GetHashCode(); } if (Data != null) { hashCode = hashCode * 59 + Data.GetHashCode(); } if (Preco != null) { hashCode = hashCode * 59 + Preco.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { return((GetType().GetHashCode() * 900) + Titulo.GetHashCode()); }
public override int GetHashCode() { return(Titulo.GetHashCode()); }