Visual Studio has a toolbar button/keyboard shortcut/menu item that comments out selected lines of C# code using //.
Is there an equivalent that comments out just the selected code using /* ... */?
e.g.
Given this code
string s = "hello";
Console.WriteLine(s + " world");
If you select + "world" and hit Ctrl+K, Ctrl+C then you end up with
string s = "hello";
//Console.WriteLine(s + " world");
However, I would like
string s = "hello";
Console.WriteLine(s /*+ " world"*/);
This would be useful for when I am making some experimental and temporary amendements to an existing codebase whilst fixing a few bugs.
Resharper does that. It costs money – but it is worth it.
It’s called “Block Comment“.
And the default keyboard shortcut is Ctrl+Shift+/