Comments in VB and C#
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)
Hardono Arifanto :: Apr.20.2007 :: Programming, .NET :: 2 Comments »
2 Comments to “Comments in VB and C#”
-
mca
Posted: Apr 20th, 2007 at 11:00 am1I give up with VB, and strict in C#!
VB, the language I’ve used for 5 years






