Does anyone know what happens if you do not implement iequtalable when using generic collections?
Posted
by ChloeRadshaw
on Stack Overflow
See other posts from Stack Overflow
or by ChloeRadshaw
Published on 2010-03-20T09:44:14Z
Indexed on
2010/03/20
9:51 UTC
Read the original article
Hit count: 297
c#
I asked a question here : http://stackoverflow.com/questions/2476793/when-to-use-iequatable-and-why about using Iequatable.
From the msdn:
The IEquatable(T) interface is used by generic collection objects such as Dictionary(TKey, TValue), List(T), and LinkedList(T) when testing for equality in such methods as Contains, IndexOf, LastIndexOf, and Remove.
If you dont implement that interface what exactly happens?? Exception / default object equals / ref equals?
© Stack Overflow or respective owner