[Mono-list] Differences in GetHashCode() of Type between .NET and Mono

Hüning, Christian Christian.Huening at haw-hamburg.de
Mon Dec 8 08:21:01 UTC 2014

Hi there,


I am using Mono alongside .NET in larger Deployments. Just recently I wanted
to use GetHashCode() of the type of an object to start a little algorithm on
each node, which needs to produce the same result when the same type’s
hashcode (or another equivalent information) is used. 

However I found that Mono and .NET produce different hashcodes for the same
type from the same DLL. On second thought, this is very clear to me, since
up to recently we could have no idea how the GetHashCode() implementation in
.NET looks like. 


Now for my algorithm this is a little showstopper. So I’ve got two

A)     Is there another way to achieve my scenario above?

B)      Are there plans to use .NET’s hashcode implementation in Mono now
that it’s available?






Christian Hüning, BSc.

Fakultät Technik und Informatik, Department Informatik

Berliner Tor 7

20099 Hamburg

Web:  <http://www.mars-group.org> http://www.mars-group.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20141208/49525120/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5886 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20141208/49525120/attachment.bin>

More information about the Mono-list mailing list