Statements
A free lesson from Swipe Coding · C#, level 1 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
A C# program consists of many small statements. A statement is a single instruction to the computer — for example "print this text". Every statement ends with a semicolon ";".
Console.WriteLine("Hello, C#!");The semicolon works like a period at the end of a sentence: it tells the compiler "this statement is complete, the next one follows". If you forget the semicolon, the compiler doesn't understand where a statement ends and reports an error.
class Program
{
static void Main()
{
Console.WriteLine("Hello!");
Console.WriteLine("How are you?");
}
}Every statement in C# must end with a semicolon.
At its core, a C# program is nothing more than a sequence of such statements. The CLR processes them strictly in order — from top to bottom, one after another. At this point there are no "shortcuts" or jumps yet — it's purely step-by-step execution.
Which character marks the end of a statement in C#?
Statements don't just float around freely — they always sit inside a block enclosed by curly braces { }, for example the block of the Main() method. We'll see exactly how these blocks work in the next lesson.
C# executes a program's statements in order, from ____ to bottom.
Keep your streak going in Swipe Coding
Swipe through every level of C# on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.
Get the Swipe apps →