sashoalm sashoalm - 1 year ago 73
C# Question

Find method in current file/class in VS2015/C#

I can use the

shortcut to search for methods but will search among the entire project:

enter image description here

This lists all the classes in all files that have this method, and I want to search only in the current file, similar to
in VAssistX. Is there a shortcut for that?

I found Is there an easy way to jump right to a method within a file?, but it's for VS2012, and they only suggest

Note: I'm looking for true navigation, not
, and only within the current file, unlike

Answer Source

To expand on the answer by Matt Schley:

Ctrl + F2 -> Tab -> then start typing and it'll sift through the functions in the file.

I know you were probably looking for something else, but this is as good as it gets for what's built into Visual Studio. Maybe there's extensions available.


This is a mapping for C#. The command name is Window.MovetoNavigation

For C++, it's default is Ctrl + F8