Visual Studio is a development environment for creating programs and applications in many different programming languages, making it one of the most widely used programs as a developer. Visual Studio is also used in our training almost every day.
To increase productivity and save time, there are a large number of shortcuts that can make working with Visual Studio easier. However, as beginners in particular do not have all key combinations in their heads, some of the most useful shortcuts for Visual Studio are listed below.
Ctrl + Enter
Probably one of the most important shortcuts. If you move the mouse over code marked in red and press Ctrl + Enter, potential solutions are displayed, and is therefore helpful to avoid errors.
Ctrl + E + F
This key combination formats the code. Either select small sections to be formatted or use Ctrl + A to select the entire code.
Ctrl + K + C
This shortcut comments out all selected lines of code. On the other hand, commented out lines can be uncommented again with the same shortcut.
Ctrl + Shift + F
Searches the entire code for a term entered in the search field. So if you can’t find for example a method in a large project, this key combination is just right.
Ctrl + – & Ctrl + Shift + -
Instead of long scrolling you can navigate backwards through the code with this combination. You stop in the line you clicked on last. So you can move backwards through the navigation history without having to search much. To go forward you use Ctrl + Shift + -.
Ctrl + R + R
With this shortcut you can for example rename properties in the whole code. So if you want to rename something, you don’t have to search for every single reference in the code, but only edit the desired code location once.
Of course there are many more shortcuts that are helpful in Visual Studio. But to list them all would go beyond the scope of this article, so only some of the most frequently used shortcuts have been listed.