mamu
mamu

Reputation: 12414

Visual Studio 2010 shortcut to find classes and methods?

Is there any shortcut in Visual studio 2010 to find classes/interfaces?

I was using Resharper few years back to do that. Here now, I don't have the Resharper and looking something similar in Visual studio 2010 which can help me do that.

Right now, I have to use find all "s classname" that's closest I can get.

Upvotes: 198

Views: 176526

Answers (10)

Alok Kumar Sahoo
Alok Kumar Sahoo

Reputation: 551

"Control + ," you will get a search textbox enter your text it will automictic show all.

Upvotes: 1

Pinte Dani
Pinte Dani

Reputation: 2049

In VS 2022, and I assume also in older versions, you may have to check the shortcuts for finding classes/types. In my case I had to manually configure the shortcut in Tools->Options->Keyboard: enter image description here

This is very similar to the ReSharper "Ctrl + T" command, which I have used more often.

Upvotes: 6

Ngwe Becky
Ngwe Becky

Reputation: 1

try: ctrl + P

type: @

followed by the name of the class,method or variable name you search for.

Upvotes: -1

driis
driis

Reputation: 164291

Visual Studio 2010 has the "Navigate To" command, which might be what you are looking for. The default keyboard shortcut is CTRL + ,. Here is an overview of some of the options for navigating in Visual Studio 2010.

Upvotes: 328

Chris Smith
Chris Smith

Reputation: 5454

Ctrl+K,Ctrl+R opens the Object Browser in Visual Studio 2010. Find what you're looking for by searching and browsing and filtering the results. See also Ctrl+Alt+J. ^K ^R is better because it puts your caret right in the search box, ready to type your new search, even when the Object Browser is already open.

Set the Browse list on the top left to where you want to look to get started. From there you can use the search box (2nd text box from the top, goes all the way across the Object Browser window) or you can just go through everything from the tree on the left. Searches are temporary but the "selected components" set by the Browse list persists. Set a custom set with the little "..." button just to the right of the list.

Objects, packages, namespaces, types, etc. on the left; fields, methods, constants, etc. on the top right, docstrings on the lower right.

The display mode of a pane can be changed by right-clicking in the empty space of the window; tree organized by assembly/container or by namespace and other preferences.

Items can be right-clicked to find, copy and filter.

For keyboard navigation, use Ctrl+K,Ctrl+R from anywhere to start a new search, Enter to execute the search you just typed or pasted and Ctrl+F6 to make the Object Browser close. ALT+<-- to go back and ALT+--> to go forward through the search history. More can be set; search for "ObjectBrowser" in the keyboard shortcut config.

If the key shortcuts above don't work, Object Browser should be in the View menu somewhere with a different shortcut. If all else fails, search for "ObjectBrowser" under Tools->Options->Environment->Keyboard->"Show commands containing".

Upvotes: 1

ashes999
ashes999

Reputation: 10163

In Visual Studio Code, the default shortcut for this is Ctrl + P.

Upvotes: -7

Hawkeye Parker
Hawkeye Parker

Reputation: 8620

Use the "Go To Find Combo Box" with the ">of" command. CTRL+/ or CTRL+D are the standard hotkeys.

For example, go to the combo box (CTRL+/) and type: >of MyClassName. As you type, intellisense will refine the options in the dropdown.

In my experience, this is faster than Navigate To and doesn't bring up another dialog to deal with. Also, this combo box has a lot of other nifty little shortcut commands:

Using the Go To Find Combo Box

This textbox used to be the default on the Standard toolbar in Visual Studio. It was removed in Visual Studio 2012, so you have to add it back using menu ToolsCustomize. The hotkeys may have changed too: I'm not sure since mine are all customized.

Upvotes: 6

dopplesoldner
dopplesoldner

Reputation: 9479

Try Alt+F12 in Visual Studio 2010.

It opens up the Find Symbol dialogue which allows you to search for methods, classes, etc.

Upvotes: 14

Orhun
Orhun

Reputation: 1252

Ctrl+T in Visual Studio 2017.

Upvotes: 75

Troy
Troy

Reputation: 13

Left click on a method and press the F12 key to Go To Definition. Other Actions also available

Upvotes: 0

Related Questions