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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top