Table of contents

Delete a whole line or multiple lines using Visual Studio shortcuts

IDE Mar 02, 2020 Viewed 2.7K Comments 0

Here are several ways to remove lines of code (such as C #, C ++, etc.) using Visual Studio 2019.

Windows

Delete line

ctrl + shift + L 

Cut line

ctrlL 

Delete rows using cut.

Mac OS

Key bindings can be set by browsing to Visual Studio > Preferences > Environment > Key Bindings, as illustrated by the following image:

Visual Studio for mac Key Bindings

Different schemes have different shortcut keys. You can type "Delete entire line" in the search box. For example:

ReSharper/Rider: + shift + L 

Visual Studio(Mixed): + shift + L or   + L 

Visual Studio(Windows):ctrl + shift + L or ctrl  + L 

Visual Studio Code: + shift + K 

Updated Mar 02, 2020