Question show line numbers

sandcounter

New member
Joined
Oct 6, 2015
Messages
3
Programming Experience
Beginner
Hello to all. This is my first thread and I am a newbee to C#. I am using Visual Studio Express 2012. I would like to see the line numbers on the left side. How do I enable this?
Thanks
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,183
Location
Norway
Programming Experience
10+
Options, Text Editor, C#, 'line numbers'.
That was incredible easy to find in VS 2015, I don't think it has changed since older VS versions.
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,792
Location
Sydney, Australia
Programming Experience
10+
All IDE options are in the Options dialogue. If you want to change something about the IDE behaviour then look in that Options dialogue first. Only if you can't find what you need should you have cause to ask anyone else. We are more then happy to help you with issues but you only have an issue if you have looked first.
 

stix

New member
Joined
Jun 19, 2015
Messages
4
Location
Melbourne, Australia
Programming Experience
10+
In actual fact it's not as simple as it may seem, especially if you are setting up your IDE for the first time (as I was just today). I mucked around for ages looking for the line numbers option until I found the solution elsewhere on the net. There's a bit of an unsuspecting trap for the unwary.

Under Tools/Options make sure you select the checkbox "Show all settings" in the bottom left hand corner of the Options dialogue box, now you will see under Text Editor/All Languages/General/Display the checkbox for Line numbers. It was there all the time, but I didn't see it.

btw. Is there an option for showing a thin vertical line connecting open/close braces?

Cheers.
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,792
Location
Sydney, Australia
Programming Experience
10+
Is there an option for showing a thin vertical line connecting open/close braces?

If I remember correctly, I once installed an extension that did that. That was some time ago though, so it may or may not still exist and they may or may not have added something to VS as standard that does the same.
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,183
Location
Norway
Programming Experience
10+
Productivity Power Tools extension does seem to have that (Structure Visualizer option).

In VS 2015 if you click before opening brace or after closing brace it will highlight the corresponding one.
 

stix

New member
Joined
Jun 19, 2015
Messages
4
Location
Melbourne, Australia
Programming Experience
10+
Thanks - I'm using Visual C# 2010 Express and it does indeed highlight the block of the corresponding brace - very useful. A while back I was fiddling with a python IDE and liked the vertical lines. I'll check out the Productivity Power Tools extension as suggested.

In any case, I'm just starting out with C# and the lack of the Structure Visualizer option will be the least of my problems.

Cheers.
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,183
Location
Norway
Programming Experience
10+
Structure Visualizer was new in PPT 2013. Express IDEs don't support extensions, but Visual Studio Community 2015 (or 2013) does.
 
Top Bottom