Method CombineHashCodes
CombineHashCodes(int, int)
Combines two integer hash codes into a single value using high-entropy bit mixing.
public static int CombineHashCodes(int newKey, int currentKey)
Parameters
Returns
- int
A 32-bit integer representing the combined hash value.
Remarks
This method multiplies currentKey by 0xA5555529,
a high-dispersion constant,
and adds newKey to it. The result achieves better distribution
across bit space
than simpler prime-based mixing strategies, and mirrors techniques used
in internal .NET hashing.