Remember, collections are not the items themselves, they contain the items.
The Item property is actually what contains the values. Now, the debugger
is not good at listing items in the Item property so what you may have to do
is use an indexer to get at the data (assuming you are using C#). For
example, you would have to do myTbl[0] to see the properties, from there you
can access the rows, and so on.
"pantichd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> <I also posted this on microsoft.public.vsnet.debugging 'cuz I didn't know
> which was more appropriate or would get quickest response>
>
>
> Hello,
>
> Can someone tell me how I can view the contents of a collection when in
> debug mode?
>
> For example, I working with a dataset and when the app stops at a
breakpoint
> I'd like to see what is actually in the Tables collection of the dataset.
I
> add a watch on my dataset variable and expand the Tables object. It just
> keeps showing me the following: Count, IsReadOnly, Is Synchronized, Item
and
> SyncRoot. Expand SyncRoot and you're at the beginning of a big old
> recursion.
>
> So if I want to see what's in row x of table y for example, I have to
create
> a variable in my code representing that row in that table and add a watch
> for THAT variable. I have to believe that there is an easier, more
dynamic,
> way for me to inspect the content of this during debugging.
>
> Any help would be greatly appreciated.
>
> David.
>
>
>
|