C# Basics — By Example (Intro)
Beginner-friendly, runnable C# snippets. Each file has:
- Clear comments explaining syntax and concepts
- A simple
Mainmethod you can run standalone - Expected output shown at the top in comments
How to run a single file quickly (one-off):
csc 00_HelloWorld.cs && mono 00_HelloWorld.exe
Or turn any file into a dotnet console project as shown in the repo root README.
Topics:
- 00 — Hello World + Program Structure
- 01 — Variables
- 02 — Data Types
- 03 — User Input
- 04 — Operators & Math
- 05 — Strings
- 06 — Booleans
- 07 — if..else
- 08 — switch
- 09 — while loop
- 10 — for loop
- 11 — break & continue
- 12 — arrays
Tip: Open side-by-side with the corresponding theory pages in this module for deeper context.