Finding all references to a generic method name in Visual Studio 2010 to solve C #

In Visual Studio 2010, if I right-click a method and select Find All References, it simply displays the use of all methods with the same name, and not the use of the method of this actual class.

The solution is C #, not C ++, so I cannot find a way to go into precision mode . In addition, I cannot just make the method private or comment on it to generate errors, since the method is override :

 public override string ToString() { ... } 

Is there a way to find all applications of a particular class method in a solution without trawling through each name match (in this case, each instance of ToString() in the solution)?

+6
source share
1 answer

Using Daniel Hilgarth's comment, I found a solution: temporarily remove the override from the declaration and it will only show links to these ToString() classes, not ToString() for all object .

+3
source

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


All Articles