does anybody know anything about undocumented method GetMethodTablePtrAsInt.
Printable View
does anybody know anything about undocumented method GetMethodTablePtrAsInt.
Actually , I've never heard nor used it before , but here some sites :
http://www.microsoft.com/mspress/boo...pchap/5353.asp
http://dotnet.di.unipi.it/Content/ss...ValueType.html
http://dotnet.di.unipi.it/Content/ss...cs-source.html
I hope this would help
this method is usually used to implement overridable GetHashCode and returns Int32 not a function pointer. when you define your Equals method for a type, you should also override GetHashCodeMethod because in order to exploit of the purpose of these methods. GetMethodTablePtrAsInt gets an object as its parameter (usually me) and returns that me as an Int32 to build the hashcoded object according to your implemented algorithm. but i advice you never use undocumented features of .net. there are so many other ways to accomplish this or the other related tasks without use of undocumented feature of the language.