/* Hello, world program This program writes "hello, world" to the console */ class Hello { static void Main() { System.Console.WriteLine("hello, world"); } }includes a delimited comment. end example] Paragraph 31 A single-line comment begins with the characters // and extends to the end of the line. [Example: The example
// Hello, world program // This program writes "hello, world" to the console // class Hello // any name will do for this class { static void Main() { // this method must be named "Main" System.Console.WriteLine("hello, world"); } }shows several single-line comments. end example] comment :: single-line-comment delimited-comment single-line-comment :: // input-charactersopt input-characters :: input-character input-characters input-character input-character :: Any Unicode character except a new-line-character new-line-character :: Carriage return character (U+000D) Line feed character (U+000A) Line separator character (U+2028) Paragraph separator character (U+2029) delimited-comment :: /* delimited-comment-charactersopt */ delimited-comment-characters :: delimited-comment-character delimited-comment-characters delimited-comment-character delimited-comment-character :: not-asterisk * not-slash not-asterisk :: Any Unicode character except * not-slash :: Any Unicode character except / Paragraph 41 Comments do not nest. 2 The character sequences /* and */ have no special meaning within a single-line comment, and the character sequences // and /* have no special meaning within a delimited comment. Paragraph 51 Comments are not processed within character and string literals.
| |
Jagger Software Ltd | |
Company # 4070126 | |
VAT # 762 5213 42 |