Csharp/CSharp Tutorial/Language Basics/Comments

Материал из .Net Framework эксперт
Версия от 12:19, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

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

  1. This type of comment must begin with /* and end with */.
  2. Anything between these two comment symbols is ignored by the compiler.

single-line comment

  1. A single-line comment begins with a // and ends at the end of the line.
  2. 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>