Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vb.net: is it possible to comment out more than 1 line of code at a time?

Tags:

vb.net

i know in java and other nice languages it's possible to comment out a bunch of lines at the same time. is it possible to do this in vb.net?

like image 725
Alex Gordon Avatar asked Dec 15 '09 18:12

Alex Gordon


People also ask

How do I comment out a line of code in VB?

text1. Text = "Hi!" ' This is an inline comment. If your comment requires more than one line, use the comment symbol on each line, as the following example illustrates. ' This comment is too long to fit on a single line, so we break ' it into two lines.


1 Answers

If you mean syntactically, like /* ... */ in C++, then no. But if you mean from your IDE, then from Visual Studio:

  • Highlight the text you want to comment out
  • Type Ctrl+K, then Ctrl+C
  • You can also uncomment text using Ctrl+K, then Ctrl+U
like image 157
Dan Tao Avatar answered Sep 28 '22 17:09

Dan Tao