Summary

This chapter presented the basic elements of writing a simple C# program. This included a minimal C# program that defined a class, a Main() method, and wrote a greeting to the screen.

Three types of commenting syntax were discussed: single-line, multiline, and XML documentation comments. Identifiers (user-defined names given to variables and various program elements the user defines), and keywords (reserved words used for the names of C# language elements) were defined. Ways to use whitespace and naming conventions to help make code easier to read and consistent with expected standards were also discussed.

The various C# types and literal values they can accept were explained. These include the bool, integral, floating point, and decimal ...

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.