Showing Line Numbers with Visual Studio 2005

While presenting recently I was asked how I was able to line numbers in my code. I often find it a nice feature while doing demos to have line numbers turned on. I think it makes it easier to view the code. With Visual Studio 2005 this is actually very easy to do.

Select Tools- Options and within the Basic Editor select the line number option

You also have the option to turn it on for specific types of file by using the show all settings button

This allows you to select specific types of files and turn on or off the line numbers. For example, with an HTML file you can turn on and off line numbers.