Visual Studio / ** / comment shortcut?

I want to know how to put comments /**/ through a shortcut. I know Ctrl + K + C shortcut for // comments, but it comments on the whole line. Sometimes during debugging I want to do something like " ref string /* char[] */ lengthValue " when I try to do something.

I want to be able to comment on a specific part of the string (not the entire string) using a shortcut, for example, in " string /* char[] */ lengthValue ". ie comments only on a specific part of a similar label

I am using Visual Studio 2013

Please, help

+26
c ++ c # visual-studio keyboard-shortcuts
source share
4 answers

I think there is no shortcut in Visual Studio for this purpose, but if you use ReSharper , you can use Ctrl + Shift + / .

Check out this . Useful

+15
source share

Keyboard shortcut for visual studio comments: Accept in HTML, C #, JS, CSS, etc. In Visual Studio.

Ctrl + k + c

 //a //b //c 

to cancel ctrl + k + u

 a b c 

Ctrl + Shift + /

 /*a b c*/ 

to undo Ctrl + Shift + /

 a b c 
+39
source share

In Visual Studio 2017 RC, just select the necessary part of the code, and then press Ctrl + K + C , there is no need for an extension!

+12
source share

To comment out a block of code (more than one line) in VS, select the code with ALT (alt + mouse or alt + shift + arrows), and then comment with Ctrl + K Ctrl + C. Only with single-line code do you not need ALT.

So basically the same as with // comments, you only need to press ALT when choosing a code for multiple lines than one.

+1
source share

All Articles