public override int GetHashCode() { unchecked { var hashCode = (Codigo != null ? Codigo.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Nome != null ? Nome.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CategoriaPai != null ? CategoriaPai.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Associavel.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { int hash = GetType().GetHashCode(); hash = hash * 31 + (Codigo == null ? 0 : Codigo.GetHashCode()); hash = hash * 31 + (Nome == null ? 0 : Nome.GetHashCode()); hash = hash * 31 + (CategoriaPai == null ? 0 : CategoriaPai.GetHashCode()); return(hash); } }