Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding all references of a common method name in Visual Studio 2010 for a C# solution

In Visual Studio 2010, if I right-click a method and choose "Find All References", it simply displays use of all methods with the same name rather than use of the method of that actual class.

The solution is C# rather than C++, so I can't find a way to switch to accuracy mode. Also, I cannot simply make the method private or comment it out to generate errors as the method is an override:

public override string ToString() { ... }

Is there any way of finding all uses of a particular class method in a solution without trawling through every single name match (in this case every instance of ToString() in the solution)?

like image 478
SharpC Avatar asked Sep 09 '13 10:09

SharpC


1 Answers

Using Daniel Hilgarth's comment I found a solution: temporarily remove override from the declaration and it will show only references to that classes ToString() rather than the ToString() for all object's.

like image 80
Quantic Avatar answered Sep 30 '22 02:09

Quantic