Swipe
SwipeSwipe
Swipe Apps

Paths

Motivation

Information

C# Program Structure · Lesson 12 of 27

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 semicolon is C#'s way of saying 'done with this thought.' ✅

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#!");
This is a single statement. It ends with a semicolon — the character that tells C# "done".
🤖
Forget this tiny character and the compiler gets confused fast. ⚠️

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?");
    }
}
Here are two statements in a row. C# executes the first one first, then the second — in exactly that order.
True or false

Every statement in C# must end with a semicolon.

🤖
No shortcuts yet — C# just runs your code top to bottom. ➡️

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.

Quick check

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.

Fill in the blank

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 →