Visual Studio: Turn on line numbering

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
Visual Studio
edit

Many development tools—e.g. FxCop—refer to source code line numbers. Visual Studio .NET always shows the current line number, but finding a particular line called out by a tool is simpler if source code line numbering is enabled.

Change Visual Studio Options

The grid layout settings are found on the Visual Studio 2005 Options dialog box. To access the Options dialog box, select the Tools / Options… menus. It is the same in the Visual Studio Express Editions.

Check Line numbers

  • Expand the Text Editor item in the left panel of the Options dialog box.
  • Select the C# item.
  • Enable source code line numbering by checking the Line numbers checkbox in the Display section of the right panel. Click the OK button and voilá—line numbers!



Personal tools