C#

The main language of the .NET ecosystem.

C# is taught here in 13 lessons, running from Syntax and types through to Modern C# 12 to 14 features and performance. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.

TrackProgramming Languages
Lessons13
LevelBeginner to intermediate
Reading timeabout 3 hours
PrerequisitesHelpful, but not required: C++

Lessons

  1. Syntax and typesThe project layout, top-level statements, the value and reference split, and nullability — the decisions that shape everything else.
  2. Classes and interfacesProperties, records, interfaces and polymorphism — the object model that domain types and services are built from.
  3. LINQ and async/awaitQuery collections and databases with one syntax, then do I/O without blocking the thread that is serving other requests.
  4. Setting up .NET: SDK, CLI and project layoutInstall the SDK, create and run projects from the CLI, understand target frameworks, and know what each command in the loop does.
  5. Collections, generics and the standard libraryPick the right collection for the access pattern, understand generics and constraints, and use Span and the modern date types.
  6. Delegates, events and lambdasUse Func and Action, capture variables without surprises, raise events correctly, and know when an expression tree is the right tool.
  7. Exceptions and error handlingCatch what you can handle, filter with when, define custom exceptions that carry data, and choose between exceptions and result types.
  8. File I/O, streams and JSON serializationRead and write files asynchronously, stream instead of buffering, and serialise JSON fast with source generation and converters.
  9. Dependency injection and configurationRegister services with the right lifetime, inject through constructors, and wire options, logging and the generic host correctly.
  10. Building a web API with ASP.NET CoreMinimal APIs, routing, validation, problem details, middleware and OpenAPI — an API you can actually ship.
  11. Data access with Entity Framework CoreModel entities, migrate the schema, query with LINQ, control loading, and use transactions and raw SQL when they are the right tool.
  12. Testing with xUnit, mocking and integration testsWrite focused unit tests, share fixtures correctly, fake dependencies, and exercise the real HTTP pipeline in memory.
  13. Modern C# 12 to 14 features and performancePrimary constructors, collection expressions, spans, AOT and trimming, and measuring with BenchmarkDotNet before optimising.

More in Programming Languages

C C++ Scala Lua Dart VBA

FAQ

How long does the C# course take?
It has 13 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for C#?
Not strictly. It helps to have read C++ first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after C#?
Continue with Scala (13 lessons), the next course in Programming Languages.