Visual Studio .NET Tips & Tricks

Helpful information for Visual Studio .NET developers

Tip: Add Line Numbers to Your Code-Behind Classes

Posted by Ion Toma on April 17, 2006

Adding Line numbers to your code can be very helpful when discussing the code with someone else. 

LineNo_Image7

How to add line numbers to the code: from Tools menu, select Options, and then the Text Editor / C# or Basic options. Select then the "Line numbers" checkbox om the right-side.

LineNo_Image7i

Also, it works well with word wrap, you can see when a line starts and ends.
Another way to bring lines to your code is using Macro Explorer Tool window; there is a build in macro built-in that allows to turn on/off the line numbers.

Note: the line numbers are in the code, they are just displayed in a column to the left. 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

 
%d bloggers like this: