I am looking something equivalent to the sizeof() in C++.
With it, i can get the exact size of the object at runtime.
Thanks.
J
--
Be Cool!
"Daniel O'Connell [C# MVP]" wrote:
[color=blue]
>
> "thejackofall" <thejackofall@discussions.microsoft.com> wrote in message
> news:11B50F79-2DAB-4830-AC5E-BFF4350AE5C8@microsoft.com...[color=green]
> > Hi.
> >
> > How do I get the size of the object at runtime? I tried Marshal.SizeOf,
> > but
> > it fails with ArgumentException.
> >
> > Suppose I want to do the following:
> >
> > DataSet oDS = new DataSet();
> > // Get the size of oDS[/color]
>
> There is no real way to get the size of an object tree at runtime, which is
> waht I assume you want to do. Marshal.SizeOf returns the marshalled size
> which is an inefficent estimate.
>
>
>
>
>
>[/color]