Folks, here\'s a thorny problem for you!
A part of the TickZoom system must collect instances of every type of object into a Dictionary<> type.
It is imperati
You are breaking the pattern, this leads to questions that can't be solved. Method Equals
should compare the contents of objects, instead of comparing references. That is what object.Equals
does, why override with same behavior?
Now about GetHashCode
. Again, hashcode is hash function applied to contents of object. You can't calculate it by reference only. You could use pointer to object and use it as hash, but in .net objects' addresses can be changed by GC.