In this example, the poster overrides the get hash code method. I understand that this was done in order to provide a better hash value for the returned object, to reduce the number of collisions and, therefore, to reduce the number of cases that Equals() will need to be called.
What I would like to know is a way to calculate this algorithm:
return 17 + 31 * CurrentState.GetHashCode() + 31 * Command.GetHashCode();
Is there any special reason that the selected numbers were selected? Can I just select my own numbers to paste into it?
source share