Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

Display line number in Visual Studio

5.00/5 (4 votes)
24 Jan 2011CPOL 19.6K  
I know that some people like to have line numbers and it is particularly useful if you are sending code to somebody else, like posting it on CP in Q&A when asking for help with a problem, for example. In cases like that, it is much easier to say the error is on line 123.However, I don't...
I know that some people like to have line numbers and it is particularly useful if you are sending code to somebody else, like posting it on CP in Q&A when asking for help with a problem, for example. In cases like that, it is much easier to say "the error is on line 123".

However, I don't like to have them on all the time so, provided that you haven't changed the default key-mappings simply type Ctl-g, enter the line number and press return. You get taken straight to the appropriate line.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)