[Mono-devel-list] IntPtr is a primitive type under .NET

Denis Gervalle dgl at softec.st
Thu Nov 11 09:10:39 EST 2004


Yes, I know this is LAMESPEC, but typeof(IntPtr).IsPrimitive returns 
true under MS.NET and false under Mono.
AFAIK, IsPrimitive should return IsPrimitiveImpl which can be overriden. 
This one normaly return information from a runtime internal function 
that tells if the type is specially treated as a primitive type in the CLR.
So, it seems that the Microsoft CLR treats IntPtr as a primitive type. 
Mono does not since the Mono runtime is not aware of IntPtr at all.
Just want to let you know that for compatibility, you may want to 
implement a special case for IntPtr.

Regards,

Denis
-- 
Denis Gervalle
SOFTEC sa
http://www.softec.st




More information about the Mono-devel-list mailing list