identityHashCode
-
Hi, Does anyone know of a direct C# equivalent, or implementation, of java's System.identiyHashCode method? Regards, Dave
Regards, Dave
maybe it is object.GetHashCode ???
-
maybe it is object.GetHashCode ???
That's "an" answer but I don't think it's "the" answer. The rason is that some objects override their base hashcode. And in this case it's the base hashcode that's needed. That's what the Java class returns, if I understand it corrctly. Regards, Dave
Regards, Dave
-
That's "an" answer but I don't think it's "the" answer. The rason is that some objects override their base hashcode. And in this case it's the base hashcode that's needed. That's what the Java class returns, if I understand it corrctly. Regards, Dave
Regards, Dave
did you try to cast that object to "object" and than use that code?
object wctohc = new WeirdClassThatOverridesHashCode();
wctohc.HashCode(); // ta-da! :) -
Hi, Does anyone know of a direct C# equivalent, or implementation, of java's System.identiyHashCode method? Regards, Dave
Regards, Dave
System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode( obj );