title: Custom type GetHashCode
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode">What is the best algorithm for an overridden System.Object.GetHashCode?</a>  </p>
  </blockquote>
  
  
  
  <p>I need to override GetHashCode method for a type which consists of three strings. Here is my code:</p>
  
  <pre><code>protected override int GetHashCode()
  {
      return str1.GetHashCode() + str2.GetHashCode() + str3.GetHashCode();
  }
  </code></pre>
  
  <p>What is a safe way of this method implementation?</p>