Commenting out huge sections of code

InertiaM

Well-known member
Joined
Nov 3, 2007
Messages
663
Location
Kent, UK
Programming Experience
10+
I am trying to manually convert some of my old VB6 code to VB.NET code, as I dont want to use the conversion tool. I used to use API calls for printing tasks, and I need to restructure / clean up the code to take account of PrintPreview, PrintDialog etc.

Is there any way I can paste huge sections of VB6 code into a VB.NET project, and then comment it out in one go, rather than put ' on every line. If I dont comment it out, I cant debug the project as I go.

If it was a web page, I'd use :-

VB.NET:
<!--

    dont process any of this

-->

Is this possible in VS 2005 :confused:
 
Ctrl-k-c, Ctrl-k-u. Ctrl-k is an extension shortcut that expects another key, so you keep holding the Ctrl key and press c for comment or u for uncomment. There are also icons on the menu line to do the same "Un-/Comment out the selected lines". What's fascinating it that it works with all languages VS supports and use language specific commenting.
 
Superb John, thank you :D

riesen_guru.gif
 
The integrated "xml documentation" system makes that easier, you just write the three ''' and a comment block is inserted.
 
Back
Top