Adding comments in C# or VFP
C# Syntax Notes
marks a single line and the matching pair
mark a block of comments. Such a block can cover anything from a few characters
within a line of code to several lines of code.
marker can be used at the start of a line or in the middle
of a line.
SqlConnection con = new SqlConnection(conString);
The danger with the block style of comment is that any mistake in the
closing tag means that all the text until the next correctly-formed
closing tag will be accidentally turned into a comment.
VFP Syntax Notes
There are three styles of comment in Visual FoxPro. The
markers are similar. They must be at the start of a line and they mark that entire
line as a comment:
style dates from dBaseII and is only supported in Visual FoxPro for
backwards compatibility. Comments written in this way can be very
difficult to understand because you tend to include the word "Note"
when you're reading them.
The third style of FoxPro comment uses a double ampersand
This can be placed anywhere in a line and marks the start of a comment which
runs to the end of the line
Visual FoxPro does not have a style of comment which will
mark a block in a program but you can select several lines
of text, right-click, and select
to mark the comments so you can easily see which code
has been remmed out in this way. The
option on the right-click menu will remove the
comment marks in the text selected.
to indentify them as comments. This tool uses