Working with comments
You might have noticed that LearningCurve has an odd line of text (line 8 in Figure 2.6) starting with two forward slashes, which were created by default with the script.
These are code comments! In C#, there are a few ways you can create comments, and Visual Studio Code (and other code editing applications) will often make it even easier with built-in shortcuts.
Some professionals wouldn’t call commenting an essential building block of programming, but I’ll have to respectfully disagree. Correctly commenting out your code with meaningful information is one of the most fundamental habits a new programmer can develop.
Single-line comments
The following single-line comment is like the one we included in LearningCurve:
// This is a single-line comment
Visual Studio Code doesn’t compile lines starting with two forward slashes (without empty space) as code, so you can use them as much as needed to explain your code to...