Насколько вероятно столкновение HashCode с функцией ниже в следующих сценариях.
Предположим, у нас есть 10 миллионов объектов.
int[] key=new int[4];
public override int GetHashCode()
{
// Use large prime multiples to create a unique hash key
// Create the hash offsets using a "even powers of 2 minus 1" method, which gives
// primes most of the time.
int hashKey = 0;
hashKey += 2047 * key[0];
hashKey += 8191 * key[1];
hashKey += 32767 * key[2];
hashKey += 131071 * key[3];
return hashKey;
}