← C# from Scratch
Lesson 3 of 39 · 10 XP
Comments
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
The compiler skips comments — they're for people.
// single-line: to the end of the line
/* multi-line:
can span several lines */
/// <summary>A documentation comment — Visual Studio builds tooltips from it.</summary>
A comment is a handy way to temporarily switch off a line without deleting it: in editors that's Ctrl+/.
Write why in comments, not what: i++; // increase i is useless, while
// enemies spawn in waves of 5, so the step is 5 explains a decision.
Task. One line of the program prints debugging junk. Comment it out (don't delete it!) so that this is left:
Start
Finish
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.