Skip to content
aviral gupta

// LEARN · LANGUAGES & FRAMEWORKS

C#

A practical C# course from a first single-file program to LINQ, asynchronous code, dependency injection and shipping a native tool. Every example is run and checked on C# 14 and .NET 10.

Level: Beginner to advanced · For: Anyone who wants to write C# on .NET, from a first program to production code. No experience needed.

Syllabus

Beginner

Coming soon

After this level you can

  • Install the .NET 10 SDK and run a single-file program with dotnet run app.cs
  • Write programs with strings, numbers, branches, loops, List<T> and Dictionary<TKey,TValue>
  • Write methods and use tuples, enums, classes, structs and records, and explain value versus reference semantics
  • Use nullable reference types and exceptions to write programs that fail clearly instead of crashing
  1. B1Getting startedComing soon · 4 lessonsRuns on your computer

    Run single-file C# programs that work with text and numbers

    You build: A tip calculator

    1. B1.1Coming soon
    2. B1.2Coming soon
    3. B1.3Coming soon
    4. B1.4Coming soon
  2. B2Branches, loops and collectionsComing soon · 5 lessonsRuns on your computer

    Control flow and store data in lists and dictionaries

    You build: A word counter

    1. B2.1Coming soon
    2. B2.2Coming soon
    3. B2.3Coming soon
    4. B2.4Coming soon
    5. B2.5Coming soon
  3. B3Methods, types and tuplesComing soon · 5 lessonsRuns on your computer

    Split programs into methods and choose the right built-in type

    You build: A unit converter

    1. B3.1Coming soon
    2. B3.2Coming soon
    3. B3.3Coming soon
    4. B3.4Coming soon
    5. B3.5Coming soon
  4. B4Classes, structs and recordsComing soon · 6 lessonsRuns on your computer

    Model data with the right kind of type and explain copy versus reference

    You build: A bank account

    1. B4.1Coming soon
    2. B4.2Coming soon
    3. B4.3Coming soon
    4. B4.4Coming soon
    5. B4.5Coming soon
    6. B4.6Coming soon
  5. B5Null safety and exceptionsComing soon · 5 lessonsRuns on your computer

    Handle missing values and failures deliberately

    You build: A robust input parser

    1. B5.1Coming soon
    2. B5.2Coming soon
    3. B5.3Coming soon
    4. B5.4Coming soon
    5. B5.5Coming soon

Beginner project

Expense tracker

A single-file program that adds, lists and totals expenses by category from standard input, with decimal amounts and no nullable warnings.

Runs on your computerSelf-checked against a rubric

Intermediate

Coming soon

After this level you can

  • Use pattern matching and switch expressions to express data-driven rules
  • Write generic types with constraints, and use delegates, lambdas and events
  • Query in-memory data with LINQ and predict when a deferred query runs
  • Read and write files and JSON, split a solution into projects and use NuGet packages
  • Write and run unit tests with dotnet test, and debug a failing test
  1. I1Pattern matchingComing soon · 4 lessonsRuns on your computer

    Express data-driven rules with patterns and switch expressions

    You build: A pricing-rules engine

    1. I1.1Coming soon
    2. I1.2Coming soon
    3. I1.3Coming soon
    4. I1.4Coming soon
  2. I2Generics, delegates and eventsComing soon · 5 lessonsRuns on your computer

    Write reusable generic code and pass behaviour around

    You build: An event-driven price alert

    1. I2.1Coming soon
    2. I2.2Coming soon
    3. I2.3Coming soon
    4. I2.4Coming soon
    5. I2.5Coming soon
  3. I3LINQComing soon · 6 lessonsRuns on your computer

    Query in-memory data and predict when queries run

    You build: A sales report

    1. I3.1Coming soon
    2. I3.2Coming soon
    3. I3.3Coming soon
    4. I3.4Coming soon
    5. I3.5Coming soon
    6. I3.6Coming soon
  4. I4Files, JSON and projectsComing soon · 5 lessonsRuns on your computer

    Read and write files and JSON, and organise code into projects and packages

    You build: A CSV-to-JSON converter

    1. I4.1Coming soon
    2. I4.2Coming soon
    3. I4.3Coming soon
    4. I4.4Coming soon
    5. I4.5Coming soon
  5. I5Testing and debuggingComing soon · 4 lessonsRuns on your computer

    Test a library with dotnet test and debug a failure

    You build: A test-first string library

    1. I5.1Coming soon
    2. I5.2Coming soon
    3. I5.3Coming soon
    4. I5.4Coming soon

Intermediate project

Library catalogue

A solution with a class library and tests that loads books from JSON, searches and groups them with LINQ and models loan states with records.

Runs on your computerSelf-checked against a rubric

Advanced

Coming soon

After this level you can

  • Write correct asynchronous code with async and await, task combinators, cancellation and async streams
  • Use the .NET generic host: dependency injection, configuration, options, logging and a background worker
  • Measure and reduce allocations with Span<T>, benchmarks and knowledge of the garbage collector
  • Use attributes, reflection, static abstract interface members and C# 14 extension members
  • Apply .NET secure-coding guidance and publish as a self-contained, single-file or native AOT app
  1. A1Asynchronous programmingComing soon · 5 lessonsRuns on your computer

    Write correct, cancellable asynchronous code

    You build: A concurrent downloader against simulated sources

    1. A1.1Coming soon
    2. A1.2Coming soon
    3. A1.3Coming soon
    4. A1.4Coming soon
    5. A1.5Coming soon
  2. A2The generic hostComing soon · 4 lessonsRuns on your computer

    Build an app with dependency injection, configuration, options, logging and a worker

    You build: A background worker service

    1. A2.1Coming soon
    2. A2.2Coming soon
    3. A2.3Coming soon
    4. A2.4Coming soon
  3. A3Performance and memoryComing soon · 5 lessonsRuns on your computer

    Measure and reduce allocations

    You build: Optimising a log parser

    1. A3.1Coming soon
    2. A3.2Coming soon
    3. A3.3Coming soon
    4. A3.4Coming soon
    5. A3.5Coming soon
  4. A4Reflection, attributes and modern C#Coming soon · 5 lessonsRuns on your computer

    Use metadata and the newest language features where they help

    You build: An attribute-driven validator

    1. A4.1Coming soon
    2. A4.2Coming soon
    3. A4.3Coming soon
    4. A4.4Coming soon
    5. A4.5Coming soon
  5. A5Security and distributionComing soon · 4 lessonsRuns on your computer

    Write safer code and ship a tool in the right format

    You build: Shipping a command-line tool

    1. A5.1Coming soon
    2. A5.2Coming soon
    3. A5.3Coming soon
    4. A5.4Coming soon

Advanced project

Concurrent feed aggregator

A hosted background worker that polls simulated feeds concurrently with cancellation and timeouts, logs through ILogger and publishes as a single file.

Runs on your computerSelf-checked against a rubric

Capstone

Capstone

Personal finance CLI

A multi-project solution with CSV and JSON import, reports, configuration, logging, tests and a native AOT build, with a portfolio README.

Runs on your computerSelf-checked against a rubric