This project is read-only.


Deserialization reliance on GetHashCode


Deserialization makes use of GetHashCode. However, some GetHashCode implementations (wrongly) expect that various references are not null (for example string fields). This leads to null exceptions, which is a serious issue.

It would be nice to have a workaround, maybe a setting to control what happens? For example, presume such instances are unique (I emulated this by substituting Guid.NewGuid().GetHashCode()). On the other hand, GetHashCode cannot guarantee uniqueness since it is limited to an int result. So there may be a more fundamental issue in play.

Any ideas?
Closed Jul 15, 2016 at 12:02 PM by MGholam


MGholam wrote Oct 23, 2014 at 8:05 PM

Since deserialize is limited to what it has created then GetHashCode() should not have any problems, I you have come across a sample please send me it so I can work on it.