Question

I am looking for a way to go from a function definition to its call. It would be the opposite of Go to definition (F12).

I already tried CTRL + - (which works quite well) but this will imply that I have to start already in the line that I want to find.

Was it helpful?

Solution 3

If you are using VIsual Studio, then it is really simple:

Right click over your method name and select: "Find all references" (you can also press Ctrl+K,R).

This will show a new window showing all the lines of code that call that specific method (it also shows you the class name and path, as well as line and column of the caller).

OTHER TIPS

you can find all references to a method, using right click Find All References, or CTRL+K,R.

P.S. If you are using VS 2013 Ultimate edition, there is also a feature called CodeLens, with which you can easily view and navigate the member references. http://msdn.microsoft.com/library/dn269218.aspx

With ReSharper, you can find all references to a method/field/variable/type/etc with Ctrl+Shift+Alt+F12.

The popup offers lots of advanced search options:

enter image description here

In VS2012 right click on the function / Find usages

In Visual-Studio 2012, I use "View Call Hierarchy", which has a shortcut CTRL-K,T

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top