C# TutorialLesson 4Free preview
C# Syntax
This lesson is part of C# · All levels
Summary
The C# syntax follows the C family style: the code is arranged into a class, the method begins with the type and name, and each statement ends with a semicolon. The code blocks are wrapped in curly braces, while the capital and lower case letters are tightly separated. The compiler will reject code with the wrong parentheses or semicolon.
Key points
- C# programs are organized into classes that contain methods, including the Main method as the entry point.
- Almost every statement is closed with a semicolon.
- Curly braces mark the beginning and end of a block of code.
- C# is case-sensitive: Value and value are considered two different names.
- Writing convention: class using PascalCase, variable and method using camelCase.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.