how to gat size of objects?

  • Thread starter Thread starter buu
  • Start date Start date
B

buu

is there any kind of attribute, something like SizeOf in vb.net?

I have many objects, and I would like to get size of them in memory
 
is there any kind of attribute, something like SizeOf in vb.net?
I have many objects, and I would like to get size of them in memory

Not really, no. What do you need the information for?

There's the Marshal.SizeOf method, but it returns the size a type
would take when marshaled to unmanaged memory (if at all possible),
which may be very different from the size an object takes up in
managed memory.


Mattias
 
The only way to do this is to load sos.dll debugger into intermediate window
during debugging and see exact sizes of objects.

rgds,
dlm,
www.bypsoft.com
cross-database comparison and synchronisation tools
DBTYP.NET - see differences, for free.
 
Back
Top