I am trying to figure out where a variable is being assigned a for-it nosensical value. I know I can select "Find Usages" from the context menu, and get a list of the places where it is referenced within its own unit, such as:
string name;
. . .
name = "Bla";
...but in cases where it is referenced outside the class, such as:
WorkFiles wrkFile = new WorkFiles();
wrkFile.name = Bla;
...Find Usages does not help out. Is there a way to see all the places a variable is touched within a project?
UPDATE
The only place the var is being assigned to in the class of which it is a member is this:
name = aname.Remove(0, 3);
...All other places where "Find Usages" found "name" are as parameters to SQL statements; but at one point it has a value such as the full value entered in an unrelated text box. So it has to be being assigned to elsewhere. Or the name "name" is causing something untoward to occur...
Selecting "Go to Reference" from the context menu takes me to the line of code shown above.
UPDATE 2
This looks promising:
http://visualstudiogallery.msdn.microsoft.com/fb5badda-4ea3-4314-a723-a1975cbdabb4