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?
Thanks. Code sample below - hash codes are different.
SortedDictionary<int,string> sd1 = new SortedDictionary<int,string>();
sd1.Add(1,"one");
sd1.Add(2, "two");
sd1.Add(5, "five");
int sd1Hash = sd1.GetHashCode();
SortedDictionary<int, string> sd2 = new SortedDictionary<int, string>();
sd2.Add(1, "one");
sd2.Add(2, "two");
sd2.Add(5, "five");
int sd2Hash = sd2.GetHashCode();