Learn modern C# on .NET 10, from your first Console.WriteLine to records, LINQ and a small final project, with every exercise checked as you go.
15 lessons, 30 exercises. Runs C# .NET 10.
Not started
Hello, output
Print text with Console.WriteLine, add comments, and see how a C# program runs from top to bottom.
Values and variables
Store values in typed variables, pick between int, double and decimal, and use const for values that never change.
Reading input and arithmetic
Read lines with Console.ReadLine, turn text into numbers with Parse, and do arithmetic with C# operators.
Making decisions
Choose what your program does with if/else, comparisons, boolean operators and switch expressions.
Loops
Repeat work with for, while and do loops, read input until it runs out, and leave early with break and continue.
Methods
Give pieces of work a name with methods and local functions, pass parameters, return values, and understand scope.
Collections
Store many values in arrays, List<T> and Dictionary<TKey, TValue>, and loop over them with foreach.
Strings and a small project
Search, slice and build text with string methods and StringBuilder, then combine everything so far in a receipt printer.
Handling errors
Catch exceptions with try/catch/finally, prefer TryParse for user input, and throw your own exceptions when rules are broken.
Classes and records
Model your own data with classes (state plus behaviour), records (data with value equality) and a quick look at structs.
Recursion
Solve problems by having a method call itself on a smaller version of the same problem.
Sorting and searching
Sort arrays and lists with custom comparisons, keep string order predictable, and find values fast with binary search.
Dictionaries and sets in depth
Count and group with Dictionary, pick the right dictionary or set, and combine sets with union, intersection and difference.
LINQ
Query collections declaratively with LINQ - filter, transform, sort, group and aggregate data in a few readable lines.
Final project: inventory and gradebook
Combine classes, records, dictionaries, exceptions, LINQ and string formatting into two small but complete programs.
Your progress is saved in this browser. Sign in to keep it on every device.