I was just browsing through MSDN website when I noticed something that all this time I considered it very trivial. Apparently in VB, you need to give every line apostrophe (’) to make that line a comment (I know this). And you can’t use the underscore (_) to continue the comment, you still need to give the apostrophe again in the next line (now that is new).

 

Very contrast compared to other language such as C# (or other similar language in that matter, like C/C++, Java), you can use double slashes (//) to start a comment. To make multiple-line comment, you need to start it with /* and end it */

 

The comparison becomes a moot point if you are using Visual Studio. You can easily select the lines, and press Ctrl+K+C to comment it, and Ctrl+K+U to uncomment the selected lines.

Powered by Gregarious (42)

Share This