Re: How Dictionary<TKey,TValue> is checking keys?



Thanks it worked.
Shimon
"Lebesgue" <lebesgue@xxxxxxxxx> wrote in message
news:uzIVDyyjGHA.1640@xxxxxxxxxxxxxxxxxxxxxxx
You should implement GetHashCode() by overriding this method from
System.Object in your class used as key.

"Shimon Sim" <shimonsim048@xxxxxxxxxxxxxxxx> wrote in message
news:uH65CbyjGHA.1320@xxxxxxxxxxxxxxxxxxxxxxx
I have Dictionary that has custom class as its key. For that class I
implemented both Equals(object) and IComparable<T>. I keep getting
KeyNotFoudException.
What should I do?
Thanks
Shimon





.