Hi Bob,
there is posibility to check object size at runtime by simply using SOS
debugger. Of course, you can use it from IDE or using "Debugging Tools for
Windows" (ADPPlus).
In both cases you should load SOS debugger (.load sos.dll) and execute
commands like
!dumpheap -type <your class>
pick memory address of that class and get
!objsize <address>
You will get your values.
There is an great article on similar topic at
http://www.csharphelp.com/archives4/archive622.html to start with this.
Of course you should take a look about SOS debugger at Microsoft site.
Best regards,
Dejan Lukovic
"Bob" <(E-Mail Removed)> escribió en el mensaje
news:#(E-Mail Removed)...
> I'm trying to decide on what data types to put into my caching object (a
> class with a static instance of Hashtable). I'm facing the choice of
either
> putting the string values or SqlParameter objects into the Hashtable.
> There'll be a couple of hundred of these values. If the SqlParameter
> objects don't eat up too much memory comparing to the strings, I'd very
much
> like to go with the SqlParameters. How can I check the memory usage of my
> static class (or rather the static instance Hashtable) at runtime when
it's
> loaded with the data? I tried the SciTech .NET Memory Profiler but not
sure
> what I was looking at.
>
> Thanks a lot
> Bob
>
>