memory-size of an object?

  • Thread starter Thread starter Günter Prossliner
  • Start date Start date
Is it posssible to get the current memory-usage of an object (e.g. a
dataset)?

Thanks, D.Barisch
 
Have you tried: System.Runtime.InteropServices.Marshal.SizeOf(yourObj) ?
This is not exactly what you are looking for but can give you an idea.
There's no supported way of determining the size of a managed object, except
if it is a value type. Then you can use the sizeof C# operator.
 

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