Style

Style is the manner or mode of expression in a program. It is distinct from the meaning of the code. Proper utilization of style elements can contribute significantly to understandability by programmers attempting to ascertain the semantics of an algorithm. These style elements include whitespace, placement of language elements, and naming conventions.

Whitespace characters separate language elements such as identifiers and keywords. These characters include newline, tab, form feed, and control-Z characters. A program may have any amount of whitespace between language elements. The compiler will ignore any extra whitespace. Effective use of whitespace goes a long way toward making programs readable.

A consistent naming convention can also ...

Get C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.