When i try to comment out some highlighted text (Using the Comment Button at the top of the menu) in C# using Visual Studio 2012, then it comments out the whole line with double slashes.
But when i use C++ in the same IDE, then it only comments out the highlighted text, using
/* */
Is there VS command/shortcut/button that comments selected text (part of the line) with /*...*/
in C# also?
This does not appear to be a setting you can change in Visual Studio. The documentation for the command the description is:
Marks the current line of code as a comment, using the correct comment syntax for the programming language.
So it would appear that the commenting ability is baked into each language config individually (no relevant settings appear under the Text Editor section specific to a language). Looks like it could have been done easily with Macros, but Macros are no long supported in 2012 :( (help bring them back!)
As the linked SO question suggests, a plug-in/add-in could be developed, but I'm guessing its not worth your time unless you do a lot of that kind of commenting :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With