Thursday, June 23, 2011

Comments in C#

C# supports two styles of comment:.
1. Multiline comment: Multiline comment must begin with /* and end with */. Anything between these two comment symbol is ignored by compiler.
Example:
                 /* This is a
                     multiline comment
                     example */
2. Single Line comment: A single line comment begins with  // and end at the end of the line.
Example:
                //single line comment example

No comments:

Post a Comment