Exemplo n.º 1
0
        /// <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()
        {
            int hash = HashCombiner.Initialize();

            hash = HashCombiner.Hash(hash, First);
            hash = HashCombiner.Hash(hash, Second);

            return(hash);
        }
Exemplo n.º 2
0
 public void Test_Hash_WithNumericOverflow()
 {
     Assert.DoesNotThrow(
         () => _hash = HashCombiner.Hash(_hash, int.MaxValue)
         );
 }