[Mono-list] accessing struct instance from managed code

Paolo Molaro lupus@ximian.com
Wed, 2 Mar 2005 11:36:35 +0100


On 03/01/05 Nigel Benns wrote:
> I understand after looking into it a little more, and the wrapper code is
> so easy to do...
> 
> Half the point of .Net is the portability, so mangling some code and
> making it platform specific defeats the purpose AFAIC.

Yes, wrapper code should be avoided whenever possible.
In most cases there is no need to use it. In other cases
doing runtime checks is possible (depending on the operating system
and the size of IntPtr can let you select the correct codepath).
Both approaches are preferable to wrapper functions.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better