I have a VB.Net application in VS2010 that has a lot of collections (mostly List(Of something))
What I want to be able to do is look at a specific property on all of the items in the collection at once.
An example:
I have a List (Of Customer)
I am searching this list to find the one matching a Customer passed to me
Dim found = From c in customers where c Is searchCustomer Select c
well, nothing is being found and I want to check what's going on. Is it that I have two instances of the same customer, or is the customer really not in the collection?
My debugging strategy would be to look at searchCustomer.CustomerId and check each of the customer object in the customers collection for their CustomerId property to see if there is a match or not.
The only ways I have been able to find to do this is
put a watch on customers(0).CustomerId..customers(99).CustomerId
which just takes too long to type
Or put a watch on the collection, and expand nodes looking at the property values - which takes too long and is just annoying
Apparently I can;t use loops in the immediate window - or I could do 'for i = 0 to 99 ... ? customer(0).Customerid ... Next' or something
I feel there must me a way of showing customers(x).CustomerId and have the debugger show every occurrence
I mean, the debugger knows how many instances there are in the collection ...
So, plz hlp! Urgntz