Delimited Comments

You might have expected multiline comments here, but the more significant distinguishing factor between different commenting styles is how a comment is terminated. For single-line comments, this means the comment runs until the end of the line. For delimited comments, a special character sequence is used to indicate the end of a comment.

Delimited comments are precisely that: They start with a /* sequence and end when the first */ sequence is encountered. They’re especially useful for longer comments, eliminating the tedious repetition of //. In addition, you’ll find them often used to provide a heading in source files, containing information about the file’s reason for existence, its author, copyright information, and so on: ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.