How to enable line numbers for C# in Visual Studio 2013

This article is also available on the Microsoft TechNet Wiki.

This article won a bronze medal in The Microsoft TechNet Guru Awards! (June 2015).

Within Visual Studio line numbers are not enabled upon first install. This wiki will show you how to enable them for C# and any other language.

The steps listed are for Visual Studio Community 2013 edition but are transferable to all newer versions of Visual Studio.

  1. Open Visual Studio.
  2. Click Tools > Options.1121.01
  3. In the Options dialog, click Text Editor and then C#. Click the Line numbers check box.5852.02

    Note: Clicking the language name is the same as clicking the General menu item.
  4. If you wish to set line numbers for other languages select the language name and click its Line numbers check box.
  5. To modify every language installed, click Text Editor > All Languages. The Line numbers check box will have a small box inside it. This means that only some languages have their Line numbers check box selected.7737.03
  6. Click the check box once to clear it and once more to place a check in it. It should look like this when finished:1220.04
  7. Now, when you open a .cs file you will have line numbers down the left side.3817.05

As well, since line numbers now appear in the file you can use the Go To feature within Visual Studio. This will enable you to move the cursor to any line by its number. The line number for the current cursor position will be listed in the bottom toolbar (see image above). To enable the Go To option, click Edit > Go To or type the short cut Ctrl + G.

See Also


About Ken Cenerelli
I am a technical writer/programmer writer/content developer, .NET developer, Microsoft MVP, public speaker, blogger, and Microsoft Azure nerd. I blog about technology at and am on Twitter via @KenCenerelli.

2 Responses to How to enable line numbers for C# in Visual Studio 2013

  1. Pingback: 2015 year in review | Ken Cenerelli

  2. Pingback: Microsoft Technical Guru – June 2015 | Ken Cenerelli

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: