ReSharper 8.0 Web Help

To comment or uncomment a block of code with a line comment
  1. Select a block of code in the editor, or place the caret at the line that you're going to comment out.
  2. On the main menu, choose ReSharper | Edit | Comment With Line Comment, or press Ctrl+/Ctrl+Alt+/.
To comment or uncomment a block of code with a block comment
  1. Select a block of code in the editor.
  2. On the main menu, choose ReSharper | Edit | Comment With Block Comment, or press Ctrl+Shift+/Ctrl+Shift+/.

The examples below show the results of each action:

Coding_Assistance__Comment_Uncomment_Code

If nothing is selected and you press Ctrl+/Ctrl+Alt+/, ReSharper comments the current line and moves the caret to the next line.

If nothing is selected and you press Ctrl+Shift+/Ctrl+Shift+/, the opening block comment and the closing block comment are inserted directly before and directly after the caret position.


This feature is supported in the following languages/technologies:

C# VB.NET HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts
feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available feature_available

Tip

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see the corresponding topics in the ReSharper by Language section.