Click here to Skip to main content
15,879,095 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Display line number in Visual Studio

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
24 Jan 2011CPOL 18.4K   2   8
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)


Written By
Retired
United Kingdom United Kingdom
Retired Systems Admin, Programmer, Dogsbody.
Mainly on Systems for Local Government, Health Authorities,
Insurance Industry - (COBOL eeeeeeeugh).
Inventor of Synchronized Shopping.

Comments and Discussions

 
Generalsorry - wrong vote button - comment belongs on original post Pin
dmjm-h31-Jan-11 7:23
dmjm-h31-Jan-11 7:23 
GeneralRe: Honestly, 4 years and 2 months and you never write me. Now I... Pin
Henry Minute31-Jan-11 11:10
Henry Minute31-Jan-11 11:10 
GeneralReason for my vote of 2 The line number option is exactly wh... Pin
dmjm-h31-Jan-11 7:20
dmjm-h31-Jan-11 7:20 
GeneralReason for my vote of 5 I hadn't thought of that before. Pin
AspDotNetDev24-Jan-11 10:18
protectorAspDotNetDev24-Jan-11 10:18 
GeneralReason for my vote of 5 Now this IS useful, even if you have... Pin
dalek924-Jan-11 6:53
dalek924-Jan-11 6:53 
GeneralEven I am of the same opinion henry. I prefer Ctrl + G inste... Pin
Pravin Patil, Mumbai24-Jan-11 1:19
Pravin Patil, Mumbai24-Jan-11 1:19 
GeneralYou meant Ctrl + G right? ;) Pin
Venkatesh Mookkan23-Jan-11 15:27
Venkatesh Mookkan23-Jan-11 15:27 
GeneralRe: You are quite right. Thanks! :D Pin
Henry Minute24-Jan-11 0:11
Henry Minute24-Jan-11 0:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.