Possible Duplicate:
C# hide and unhide comments
Is it possible to turn off and on all the //
comments at once on Visual Express C#? I comment my code a lot and being able to turn off all of them at once would really help my workflow.
Possible Duplicate:
C# hide and unhide comments
Is it possible to turn off and on all the //
comments at once on Visual Express C#? I comment my code a lot and being able to turn off all of them at once would really help my workflow.
Select the lines then:
Ctrl + K + U
And the opposite:
Ctrl + K + C
You can find the shortcuts also through the menus - Edit -> Advanced -> ... The shortcuts are listed next to the commands.
And of course, these are also on the Text Editor toolbar:
A simpler way might be to use compiler directives instead of comments, e.g.
#ifdef commentedCode
Console.WriteLine("This is a comment");
#endif
Then, in your project settings, on the Build property page, add commentedCode
to the Conditional compilation symbols to include the code, and remove it to ignore the code. Not exactly what you asked, but probably quicker than editing multiple files with comments.