VS2005 debugger: adding hours to specific fields in all list objects?

Visual Studio 2005 allows you to add hours to individual list items. 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 thousands of elements. I know that you can add a clock to the expressions foos [1] .x or foos [i] .x. I would like to know if I can add a clock to foos [all] .x so that the window of my window automatically looks like this:

foos[0].x = 1
foos[1].x = 2
// ...
foos[foos.Count-1].x = 42

This will save a lot of time by allowing me to visualize the contents of my list. Does VS2005 or one of its plugins have a way to do this? How about VS2010?

+3
source share
2 answers

"", , . , , google.

Debug.Print:

:

 for (int i = 0; i < foos.Count(); i++)
 {
    Debug.Print("foos[{0}].x={1}",i,foos[i].x);
 }
+2

Source: https://habr.com/ru/post/1780097/


All Articles