Try System.Runtime.InteropServices.Marshal.SizeOf(Type).

^Tum


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:mono-list-
> [EMAIL PROTECTED] On Behalf Of Giuseppe Greco
> Sent: Saturday, 2 August 2003 3:52 a.m.
> To: Mono
> Subject: [Mono-list] Reflection
> 
> Hi all,
> 
> sorry for my stupid question... but does anybody know how
> can I get the size of a type without using sizeof()?
> 
> For example, sizeof(Int32) returns 4; how can I obtain the
> same result using the Type class?
> 
> Thanks,
> Gius_.
> 
> --
> ----------------------------------------
> Giuseppe Greco
> 
> ::agamura::
> 
> phone:  +41 (0)91 604 67 65
> mobile: +41 (0)76 390 60 32
> email:  [EMAIL PROTECTED]
> web:    www.agamura.com
> ----------------------------------------
> 
> _______________________________________________
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list


_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to