Esempio n. 1
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return((_id.GetHashCode() * 397) ^ _chance.GetHashCode());
     }
 }
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var result = _id.GetHashCode();
         result = (result * 397) ^ _chance.GetHashCode();
         result = (result * 397) ^ _min.GetHashCode();
         result = (result * 397) ^ _max.GetHashCode();
         return(result);
     }
 }