C#
.NET, Windows apps and Unity games
Learn C# from scratch: from your first program, variables and conditions to collections, methods, classes, interfaces, LINQ and asynchronous code. Console examples have been run on .NET 10 and are shown with their real output, while framework code comes with sample output. In the professional module you will learn the .NET CLI and NuGet, testing with xUnit, Entity Framework Core and building a Web API with ASP.NET Core.
Course content
C# basics
BeginnerMeet C# and .NET, write your first program and learn variables, types, strings and conditions.
- 1What is C#? .NET and your first programFind out what C# and the .NET platform are and where they are used, and write your first program.12 min
- 2Variables, types and stringsStore values in variables, get to know the basic types and `var`, convert numbers and build neat text with interpolation.18 min
- 3Conditions, switch expressions and pattern matchingTeach your program to make decisions: `if`/`else`, logical operators, modern `switch` expressions and patterns.17 min
Loops, collections and methods
BeginnerRepeat work with loops, keep data in collections and split code into reusable methods.
- 4Loops, arrays and collectionsRepeat work with `for`, `while` and `foreach` loops and store data in arrays, `List<T>` and `Dictionary<TKey,TValue>`.22 min
- 5Methods: parameters, return values, ref and outWrite your own methods: parameters, `return`, the short `=>` form, optional and named arguments, tuples, `ref` and `out`.18 min
Object-oriented C#
IntermediateBuild classes, properties, constructors, records, inheritance and interfaces, and handle errors with exceptions.
- 6Classes, properties, constructors and recordsBundle data and behaviour together: classes, objects, properties, constructors, primary constructors and record types.20 min
- 7Inheritance, interfaces and polymorphismDerive new classes from existing ones, override methods with `virtual` and `override`, and use abstract classes and interfaces so one piece of code works with many kinds of objects.20 min
- 8Exceptions: catching and throwing errorsHandle errors that happen while a program runs with `try`, `catch` and `finally`, throw your own exceptions with `throw` and learn when not to use them.17 min
Modern C#
AdvancedQuery data with LINQ, write asynchronous code with async/await and combine it all in a small project.
- 9LINQ: querying dataFilter, transform, sort and total collections with lambda expressions and LINQ methods: `Where`, `Select`, `OrderBy`, `Sum`, `Average`, `GroupBy`.19 min
- 10async/await and a small console projectUse `Task`, `async` and `await` to do work that involves waiting without freezing the program, then combine everything from the course in one project — a gradebook report.24 min
Professional C# and .NET
AdvancedBuild projects with the .NET CLI, write tests with xUnit, work with advanced LINQ, parallel code and EF Core, and create a Web API with ASP.NET Core.
- 11The .NET CLI, projects and NuGetCreate, build, run and test projects with the `dotnet` command, combine them in a solution and add NuGet packages.20 min
- 12Testing with xUnitWrite unit tests with xUnit: `[Fact]`, `[Theory]` and `[InlineData]`, assertions, the FluentAssertions style and replacing dependencies with Moq.21 min
- 13Advanced LINQ and genericsGroup and join data with `GroupBy`, `Join` and `SelectMany`, understand deferred execution in depth, and write generic constraints and extension methods.23 min
- 14Asynchronous and parallel programmingTell waiting work from computing work: asynchronous streams, cancellation tokens, `Parallel` and PLINQ, `ConfigureAwait` and blocking traps.23 min
- 15Entity Framework Core: working with databasesCreate tables from classes with EF Core: `DbContext`, migrations, LINQ to Entities, CRUD operations, relationships and typical performance traps.24 min
- 16A Web API with ASP.NET CoreBuild a CRUD API on top of EF Core with ASP.NET Core: minimal APIs and controllers, dependency injection, middleware, configuration, validation and OpenAPI.25 min