public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ Breed.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Color; return(hashCode); } }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object" />. /// </returns> public override int GetHashCode() { unchecked { var hashCode = (_Owner != null ? _Owner.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Breed != null ? Breed.GetHashCode() : 0); hashCode = (hashCode * 397) ^ BirthDate.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Name != null?Name.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Color != null ? Color.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Breed != null ? Breed.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Age; return(hashCode); } }
public override int GetHashCode() { return(Name.GetHashCode() + Breed.GetHashCode() + Birthday.GetHashCode()); }
public override int GetHashCode() { return(Name.GetHashCode() ^ Breed.GetHashCode()); }