I would like to be able to know, in run-time in my code, how much memory a certain object is taking (a Dataset in this case, but i'm looking for a "general" solution).
Is this possible through reflection?
This is for .Net 2.0.
Thanks!
I would like to be able to know, in run-time in my code, how much memory a certain object is taking (a Dataset in this case, but i'm looking for a "general" solution).
Is this possible through reflection?
This is for .Net 2.0.
Thanks!
I believe this is a duplicate. Check out:
Great, so to sumarize, there is no easy way, other than using the Profiling API which is a lot of work. Thanks!
int size = Marshal.SizeOf(typeof(int));
That should work too.