Display Line Numbers in Visual Studio 2010 Editor

In this article we have a look at how to enable line numbers in Visual Studio 2010 Source Editor Window. You often see Visual Studio code with or without line numbers. When you try to add line numbers with Visual Studio 2010 Source Editor, you might receive an error massage. This behavior is by default and happens when we try to add line numbers manually.  

Let us see how to enable or disable the display of line numbers in the Visual Studio 2010 Source Editor Window. To turn on line numbers the following explains a simple procedure to do that.

Step 1: On the Tools menu, click "Options".

Display-Line-Numbers-in-Visual-Studio-2010-Editor-1.jpg

Step 2: When we click on the option, the Options window will be displayed:

Display-Line-Numbers-in-Visual-Studio-2010-Editor-2.jpg

Step 3: In the Options pop-up box select "Text Editor" and expand it and select "All languages" and expand it and select "General".

Or

"Text Editor" -> "All languages" -> "General"

Display-Line-Numbers-in-Visual-Studio-2010-Editor-3.jpg

Step 4: In the General page's right side panel you need to select the check box "Line numbers" under the "Display" section as shown in the following image.

Display-Line-Numbers-in-Visual-Studio-2010-Editor-4.jpg

Step 5: Now click "OK" to save the changes and test it.

Display-Line-Numbers-in-Visual-Studio-2010-Editor-5.jpg

Step 6: Uncheck the check box of the line number and click the "Ok" button that prevents line numbers.

 


Similar Articles