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
ctrl + L
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:
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