Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Comments | Getting Started
C# Basics

CommentsComments

In programming, comments are parts of code that are meant for leaving messages, notes or perhaps comments, in the code, for yourself or for other people who might read it. A comment does not affect the functionality of the program.

A Single-Line Comment can be added using the double forward slash (//) operator:

cs

main.cs

A Multi-Line Comment can be added by enclosing the text inside /* and */ operators.

cs

main.cs

Multi-Line comments can also be used to comment out parts of a single line. For-example:

cs

main.cs

It is also a common practice to comment-out a piece of code which we temporarily want to exclude from the program:

cs

main.cs

question-icon

What lines will be included in the output of the following program?

Виберіть кілька правильних відповідей

Все було зрозуміло?

Секція 1. Розділ 5
course content

Зміст курсу

C# Basics

CommentsComments

In programming, comments are parts of code that are meant for leaving messages, notes or perhaps comments, in the code, for yourself or for other people who might read it. A comment does not affect the functionality of the program.

A Single-Line Comment can be added using the double forward slash (//) operator:

cs

main.cs

A Multi-Line Comment can be added by enclosing the text inside /* and */ operators.

cs

main.cs

Multi-Line comments can also be used to comment out parts of a single line. For-example:

cs

main.cs

It is also a common practice to comment-out a piece of code which we temporarily want to exclude from the program:

cs

main.cs

question-icon

What lines will be included in the output of the following program?

Виберіть кілька правильних відповідей

Все було зрозуміло?

Секція 1. Розділ 5
some-alt