public override int GetHashCode() { unchecked { return((Id.GetHashCode() * 397) ^ TypeID.GetHashCode()); } }
public override int GetHashCode() { var hashCode = 969184184; hashCode = hashCode * -1521134295 + TypeID.GetHashCode(); hashCode = hashCode * -1521134295 + Angle.GetHashCode(); return(hashCode); }
public override int GetHashCode() { if (GroupID != 0) { return(TypeID.GetHashCode() ^ GroupID.GetHashCode() ^ FileID.GetHashCode()); } else { return(TypeID.GetHashCode() ^ FileID.GetHashCode()); } }
/// <summary> /// Serves as the default hash function. /// </summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { var hashcode = ID.GetHashCode(); hashcode ^= IP.GetHashCode(); hashcode ^= Campus.GetHashCode(); hashcode ^= Row.GetHashCode(); hashcode ^= Description.GetHashCode(); hashcode ^= Status.GetHashCode(); hashcode ^= Type.GetHashCode(); hashcode ^= TypeID.GetHashCode(); return(hashcode); }
// and cause we override Equals, also override GetHashCode! public override int GetHashCode() { //found online. it gets the values and calculates a Hash that is semi unique thanks to the properties given. unchecked // Overflow is fine, just wrap { var hash = 17; // Suitable nullity checks etc, of course :) hash = (hash * 23) ^ ID.GetHashCode(); hash = (hash * 23) ^ TypeID.GetHashCode(); hash = (hash * 23) ^ CreationDate.GetHashCode(); //hash = (hash * 23) ^ this.Notes.GetHashCode(); return(hash); } }
public override int GetHashCode() { return(TypeID.GetHashCode()); }