Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I can use the Ctrl+, 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 Alt+M 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 Ctrl+F or Ctrl+,.

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

like image 695
sashoalm Avatar asked Oct 28 '16 13:10

sashoalm


2 Answers

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.

EDIT

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

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

like image 168
KidBilly Avatar answered Sep 19 '22 12:09

KidBilly


For VS2019 you can use Alt + \ for object search.

like image 20
Metaller Avatar answered Sep 21 '22 12:09

Metaller