title: Tuple's GetHashCode hack
body: <p>Knowing that to obtain hashcode for two objects it is common practice to do XOR of their respective hashcodes I wanted to check how Tuple deals with situation where <code>Item1 == Item2</code>. This is what I found in the source code:</p>
  
  <pre><code>internal static int CombineHashCodes(int h1, int h2) {
          return (((h1 &lt;&lt; 5) + h1) ^ h2);
      }
  </code></pre>
  
  <p>I assume this is to avoid having the same hashcode for all equal objects, because <code>x ^ x = 0</code>. Why <code>h1 &lt;&lt; 5</code> though? Is there a reason why it's specifically <code>5</code>? Could it be just <code>1</code>? Help me understand this please.</p>