Robert,
You can't really do this through managed code. If you wanted to do
this, you would have to hook into the CLR using the debugging interfaces (a
bunch of COM work), and do it from there. The CLR doesn't expose this
information to managed code.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Frank Rizzo" <no**@none.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
I am doing some memory profiling work and I am trying to figure out the
minimum size of an object. The object has a bunch of variables that are
other objects (hashtables, array lists, and whatnot).
How can I measure the size of such an object? C# provides a sizeof
operator, but only for value types.
Regards,
Robert