You will want to look at the Marshal class since sizeof() is for unsafe
codeblocks only. Marshal class has the ability to get the unmanaged storage
requirements of a struct, for instance.
This isn't usually something you need to concern yourself with in the
managed world. Ever.
"Roberto Lopes" <ro************@yahoo.ca> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
Hi!,
I have a class in which I have, lets say 8 int members;
I need to know the size of that class ( which is now 8 * 4 bytes ).
In C, we used sizeof( myClass ), but I can't find how to do it in C#.
Any idea how to do it the .Net way ? ( besides using unsafe and sizeof)
Thanks