Tutorial by Examples: comment

HTML comments can be used to leave notes to yourself or other developers about a specific point in code. They can be initiated with <!-- and concluded with -->, like so: <!-- I'm an HTML comment! --> They can be incorporated inline within other content: <h1>This part will be d...
Conditional comments can be used to customize code for different versions of Microsoft Internet Explorer. For example, different HTML classes, script tags, or stylesheets can be provided. Conditional comments are supported in Internet Explorer versions 5 through 9. Older and newer Internet Explorer ...
Single-line comments in Lua start with -- and continue until the end of line: -- this is single line comment -- need another line -- huh? Block comments start with --[[ and end with ]]: --[[ This is block comment. So, it can go on... and on... and on.... ]] Block comme...
Razor has its own comment syntax which begins with @* and ends with *@. Inline Comment: <h1>Comments can be @*hi!*@ inline</h1> Multi-line Comment: @* Comments can spread over multiple lines *@ HTML Comment You can also use the normal HTML comment syntax starting with &...
/// <summary> /// This interface can do Foo /// </summary> public interface ICanDoFoo { // ... } /// <summary> /// This Bar class implements ICanDoFoo interface /// </summary> public class Bar : ICanDoFoo { // ... } Result Interface summary Clas...
Single line comments are preceded by --, and go until the end of the line: SELECT * FROM Employees -- this is a comment WHERE FName = 'John'
Multi-line code comments are wrapped in /* ... */: /* This query returns all employees */ SELECT * FROM Employees It is also possible to insert such a comment into the middle of a line: SELECT /* all columns: */ * FROM Employees
/// <summary> /// Returns the data for the specified ID and timestamp. /// </summary> /// <param name="id">The ID for which to get data. </param> /// <param name="time">The DateTime for which to get data. </param> /// <returns>A Data...
To generate an XML documentation file from documentation comments in the code, use the /doc option with the csc.exe C# compiler. In Visual Studio 2013/2015, In Project -> Properties -> Build -> Output, check the XML documentation file checkbox: When you build the project, an XML file wi...
A comment is marked by an apostrophe ('), and ignored when the code executes. Comments help explain your code to future readers, including yourself. Since all lines starting with a comment are ignored, they can also be used to prevent code from executing (while you debug or refactor). Placing an ap...
Sub RemComments() Rem Comments start with "Rem" (VBA will change any alternate casing to "Rem") Rem is an abbreviation of Remark, and similar to DOS syntax Rem Is a legacy approach to adding comments, and apostrophes should be preferred Rem Comments CANNOT appear af...
To add annotations, hints, or exclude some code from being executed JavaScript provides two ways of commenting code lines Single line Comment // Everything after the // until the end of the line is excluded from execution. function elementAt( event ) { // Gets the element from Event coordinate...
There are three types of comment: # This comment continues to the end of line -- This comment continues to the end of line /* This is an in-line comment */ /* This is a multiple-line comment */ Example: SELECT * FROM t1; -- this is comment CREATE TABLE stack( /*id_user int...
Everything to the right of // in the same line is commented. int i = 0; // Commented out text
HTML comments (optionally preceded by whitespace) will cause code (on the same line) to be ignored by the browser also, though this is considered bad practice. One-line comments with the HTML comment opening sequence (<!--): Note: the JavaScript interpreter ignores the closing characters of H...
Comments in XML look like so: <!-- This is a comment --> They can appear in element content or top-level: <?xml version="1.0"?> <!-- a comment at the top-level --> <document> <!-- a comment inside the document --> </document> Comments canno...
; We make single line comments by writing out text after a semicolon
#| We make block comments like this |#
REM This is a comment REM is the official comment command.
::This is a label that acts as a comment The double-colon :: comment shown above is not documented as being a comment command, but it is a special case of a label that acts as a comment. Caution: when labels are used as comments within a bracketed code block or for command, the command processor...

Page 1 of 4