Visual Studio 2005 allows you to add a watch on particular elements of a list. For example, let's say we have a class like this:
class Foo
{
string name;
int x;
int y;
}
And then we declare:
List<Foo> foos = new List<Foo>();
... and it fills up with thousands of elements. I know that it is possible to add a watch on the expressions foos[1].x or foos[i].x. What I would like to know is whether I can add a watch on foos[all].x so that my watch window will automatically look like this:
foos[0].x = 1
foos[1].x = 2
// ...
foos[foos.Count-1].x = 42
This would save a great deal of time in allowing me to visualize the contents of my list. Does VS2005 or one of its plugins have a way to accomplish this? How about VS2010?