Get started with Visual Studio 2017

Navigating code

Visual Studio has a few utilities for quickly navigating to relevant parts of your code:

Go To commands

Visual Studio’s Go To commands perform a focused search of your code to quickly find specific types, members, or symbols in your code. You can also use it to navigate to certain files or lines of code. To start using Go To commands, use the menu option Edit → Go To → Go To All or the keyboard shortcut Ctrl + T.

A search box will appear at the top right of your code editor window – start typing to search through your code.

Go To all

By default, Go To will display any item in your solution that matches your search term. You can also filter your code search to specific element types by prefacing your search term with certain characters or selecting one of the icons above the search box.

Prefix Icon Description
# Go To symbol icon Go to the specified symbol
f Go To file icon Go to the specified file
m Go To member icon Go to the specified member
t Go To type icon Go to the specified type
: Go To line number icon Go to the specified line number

Go To member

You can also select one of the two document icons above the search bar to filter where Visual Studio searches.

Icon Description
Go To search current document icon Search current document only
Go To search external documents too icon Search external documents in addition to those located in the project/solution

Go To Definition

The Go To Definition command takes you to the line of code where a selected element is defined so that you can see more context about the element. To use this feature, either right-click a symbol and click Go To Definition, or hold the Ctrl button and click on the symbol. You can also use the keyboard shortcut F12.

Go To Definition

Find All References

The Find All References command shows you where a selected element is used. To use this feature, right-click on a symbol and click Find All References. You can also use the keyboard shortcut Shift + F12.

Find All References

I ran into an issue Next: Debugging