Useful Dev features in Visual Studio

Enable Code Lens:

Code lens is a very useful feature where the scroll button in the Visual Studio Editor is replaced by the Code Lens. It lets you take a peek into the part of code you mouse-over on the
To enable it, go to Tools->Options and enable check-box as shown below:

You can also selectively set other code lens features as shown in the screen-shot above.


Above the Code Lens is the splitter as shown below. It lets you split your code-Editor screen into 2 parts when you click, hold and drag it as shown below:

The below screenshot is divided into two code-editors. On the above part, you can move around say do Ctrl+Home to go to the top of the file.

On the below part, do Ctrl+End to move to the bottom of the file.

Ctrl + M + O

This short-cut lets you collapse the entire code file as per regions.

Create #regions

Using #region and #endregion, you can divide your code-sections into collapsible regions in your .cs file.


This lets you quickly move to the search bar of your Solution Explorer and search for files in your Solution.

Navigate Forward and Backward

If you want to quickly navigate between current and previous cursor positions in same or different code files, you can do as follows:

Navigate backward: Ctrl + –
Navigate forward: Ctrl + Shift + –

The Navigation buttons are also available under the File Menu as shown:

Peek Definition

Now and then you need peek into the properties of a class. Just place your cursor on the class name and do Alt+F12 or right-click peek definition.