Create readable code with conventions, whitespace, and comments in C#

Beginner
Developer
Student
.NET

Write code that is easier to read, update and support using naming conventions, comments and whitespace.

Learning objectives

In this module, you will:

  • Choose a descriptive name for variables that describe their purpose and intent.
  • Use code comments to temporarily instruct the compiler to ignore lines of code.
  • Use code comments to describe higher-level requirements or purpose for a passage of code.
  • Write code that effectively uses whitespace to convey the relationship of lines of code.

Prerequisites

  • Experience declaring variables using common data types
  • Experience using Console.WriteLine() to output messages to a console
  • Experience using the if and else if statement