All comment shortcut keys: Windows: Ctrl K, Ctrl CMac: Cmd K, Cmd C This shortcut key can quickly comment the selected code, starting with double forward slashes (//), including C#, VB. NET and F#.
Shortcut keys for all comments in VS
In Visual Studio, you can use shortcut keys to quickly comment on the code , improve development efficiency.
All comments
This shortcut key will comment out the currently selected code.
Expand the explanation
The following is a detailed explanation of the shortcut key:
Step 1: Select the code
Use your mouse or keyboard to select the code you want to comment.
Step 2: Use Shortcut Keys
Hold down the Ctrl or Cmd key, then press the K and C keys.
Result:
The selected code will be commented out, starting with double forward slashes (//).
Example:
<code class="c#">// This is a commented line. Console.WriteLine("Hello world!");</code>
Tip:
The above is the detailed content of Shortcut keys for all comments in vs. For more information, please follow other related articles on the PHP Chinese website!