Книга: C# 2008 Programmer

Comments

Comments

In C#, you can insert comments into your program using either // or a mirrored pair of /* and */. The following example shows how to insert comments into your program using //:

//---declare the variables---
int num1; //---num1 variable---
int num2 = 5; //---num2 variable---
float num3, num4; //---num3 and num4 variables---

And here's an example of how to insert a multi-line block of comments into your program:

/*
 Declares the following variables: num1, num2, num3, num4
*/
int num1;
int num2 = 5;
float num3, num4;

In general, use the // for short, single-line comments and /* */ for multi-line comments.

Оглавление книги

Оглавление статьи/книги

Генерация: 0.070. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз