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.
 
Back
Top