Roy,
Without hooking into the debugging interfaces that the CLR exposes, it's
impossible to say. While you could marshal these to unmanaged memory, the
amount of memory of a representation in unmanaged memory is not always
guaranteed to be the same as the object in managed memory.
Of course, some things are easy to figure out (int, long, byte, for
example), but overall, it's really not possible.
What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Roy" <Ro*@discussions.microsoft.com> wrote in message
news:86**********************************@microsof t.com...
I have an object with array of some data types. How do I get the number of
bytes for it in managed code? The underlying data types could be primitive
types or userdefined structures.
For example I have an integer array boxed in object.