Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article describes how to show or hide line numbers in your code.
On the Visual Studio menu bar, select Tools > Options > Text Editor, and then select either the language you're using or All Languages. All Languages turns line numbers on or off in all supported programming languages.
You can also type line number in the Visual Studio Search box, and then select Turn line numbers on or off in the results.
Select the Line numbers checkbox to show line numbers, or clear the checkbox to hide line numbers.
Note
Line numbers aren't added to your code. They're just for reference.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayTraining
Module
Install and configure Visual Studio Code for C# development - Training
Learn how to configure Visual Studio Code for C# and how to use this professional IDE to create and run console applications.