C# · Learn
The C# curriculum
C# is a statically typed, object-oriented language that runs on .NET. It powers web services written with ASP.NET Core, desktop and mobile applications, and games built in Unity, and its compiler catches many mistakes before a program runs. This curriculum starts with the beginner path (a first program, types, conditions and loops, methods, arrays and lists), moves through the intermediate path (classes, inheritance and interfaces, exceptions) and ends with the advanced path (LINQ and async). Every example targets .NET 8 and every program shown on the site has been compiled and run.
- lessons
- 3 lessons
- hours of reading
- 0.5 hours of reading
- exercises to practise
- 13 exercises to practise
Beginner
3 lessons · about 30 minutes of reading, plus practice.
- C# Syntax and Your First ProgramHow a C# program is put together on .NET 8: top-level statements, semicolons and braces, comments, Console.WriteLine for output and Console.ReadLine for input.8 min
- Variables and Types in C#How C# variables are declared with a type, what int, long, double, decimal, bool, char and string hold, when var is allowed, and how to turn input text into.10 min
- Conditions and Loops in C#How C# chooses and repeats: if, else if and else, switch statements and expressions, for, while, do-while and foreach loops, and break and continue, with.11 min