Consistent hashcodes for dictionaries in c#
<p>You would think that if two dictionaries contained the same keys and values they would return the same hash code? but they don't - how do i get two dictionaires to return the same hash code if they contains the same keys and values?</p>

<p>Thanks. Code sameple below - hash codes are different.</p>

<p>SortedDictionary sd1 = new SortedDictionary();
        sd1.Add(1,"one");
        sd1.Add(2, "two");
        sd1.Add(5, "five");
        int sd1Hash = sd1.GetHashCode();</p>

<pre><code>    SortedDictionary&lt;int, string&gt; sd2 = new SortedDictionary&lt;int, string&gt;();
    sd2.Add(1, "one");
    sd2.Add(2, "two");
    sd2.Add(5, "five");
    int sd2Hash = sd2.GetHashCode();
</code></pre>
