Csharp/CSharp Tutorial/Language Basics/Comments — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 15:31, 26 мая 2010
Illustrates the use of comments
class MainClass
{
public static void Main()
{
// display "Hello World!" on the screen
System.Console.WriteLine("Hello World!");
}
}
Hello World!
Use comment in C#
A multiline comment
- This type of comment must begin with /* and end with */.
- Anything between these two comment symbols is ignored by the compiler.
single-line comment
- A single-line comment begins with a // and ends at the end of the line.
- Programmers use multiline comments for longer remarks and single-line comments for brief, line-by-line descriptions.
1.3.ruments 1.3.1. Use comment in C# 1.3.2. <A href="/Tutorial/CSharp/0020__Language-Basics/Illustratestheuseofcomments.htm">Illustrates the use of comments</a>