Courses / Professional engineering / C# Programming

Free courseSelf-paced

C# Programming

Write, test and persist C# command-line applications on .NET using classes, LINQ, async tasks and JSON files.

  • Who it's for. Beginners with basic programming logic and no C# or .NET experience.
  • Before you start. Courses: Programming Problem Solving.
  • 36 to 60 hours of study with practice
  • 9 modules, 67 lessons
  • 3 guided projects and a final project

What you'll learn

  • Install, pin and use the .NET SDK to build, run and test console solutions from the command line
  • Write typed C# using value and reference types, control flow, methods and collections with correct boundary handling
  • Design classes, records, interfaces and generics and use nullable reference types to make absent values explicit
  • Handle failure with exceptions and dispose resources deterministically
  • Query and shape data with LINQ and understand deferred execution

Skills you'll gain

  • .NET workspace
  • Types
  • control flow
  • Methods
  • collections
  • Classes
  • interfaces
  • Exceptions
  • resources
  • LINQ fundamentals
  • Async tasks
  • Files
  • serialization
  • Application tests

Tools you'll use

  • C#
  • .NET SDK
  • dotnet CLI
  • LINQ
  • System.Text.Json
  • xUnit

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 9 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 4 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 3

    Command-line unit and ledger toolkit

    Covers .NET workspace, Types and control flow and Methods and collections.

    You build: Guided project: Pinned solution with a console project that reads stdin lines with TryParse and exits with documented codes.

  2. 02

    Modules 4 to 6

    Typed catalogue with validated models and LINQ reports

    Covers Classes and interfaces, Exceptions and resources and LINQ fundamentals.

    You build: Guided project: Records and validated classes with nullable optional fields.

  3. 03

    Modules 7 to 8

    Persistent async store with tests

    Covers Async tasks and Files and serialization.

    You build: Guided project: Async load and save methods that accept a CancellationToken JSON repository with required members, corrupt-file recovery and temp-file-then-move saving.

  4. 04

    Module 9

    Final project and assessment

    Covers Application tests, then the final project: Typed C# command-line application with persistence and tests.

    You build: Final project, one of: Task manager CLI / Expense tracker CLI / Equipment lending ledger CLI.

Full curriculum

9 modules and 67 lessons, 36 to 60 hours of study

01.NET workspace7 lessons, 3 to 5 hours

Lessons

  • Install the SDK and verify versions with dotnet --info
  • Create, build and run a console project from the CLI
  • Read Program.cs: top-level statements and using directives
  • Read build diagnostics: errors, warnings and CS codes
  • Read console input safely with ReadLine and TryParse
  • Organise a solution with a class library and project references
  • Project settings: Nullable, ImplicitUsings and the language version

After this module you can

  • Run dotnet --version, --list-sdks and --info, then record which SDK, runtime and OS the workspace uses and decide whether it matches the course target (.NET 10 LTS).
  • Use dotnet new console, dotnet build and dotnet run to produce a working project and name each file the template generates, including the TargetFramework value.
  • Read and set Nullable, ImplicitUsings and LangVersion in a csproj and use `#error version` to report the language version a project compiles with.
02Types and control flow8 lessons, 4 to 6 hours

Lessons

  • Built-in numeric types, bool, char and literals
  • Local variables: var, const and explicit casts
  • Arithmetic: integer division, remainder and overflow
  • Strings: immutability, interpolation and safe slicing
  • Decisions: if/else, boolean operators and short-circuiting
  • switch statements and expressions with patterns
  • Enums: named constants, parsing and exhaustive handling
  • Loops: for, while, foreach and exiting early

After this module you can

  • Pick int, long, double, decimal, bool or char for a given quantity and write literals with the right suffix (L, f, m) so the compiler infers the intended type.
  • Predict the static type var infers, declare const values, and apply implicit versus explicit numeric conversions including truncation by a cast.
  • Choose for, while, do-while or foreach for a task, use break and continue correctly, and explain why a foreach cannot add to the collection it iterates.
03Methods and collections8 lessons, 4 to 6 hours

Lessons

  • Methods: parameters, return values and pass-by-value
  • Optional, named and params parameters
  • out parameters and tuple returns
  • Arrays: fixed length, indices from the end and ranges
  • List<T>: growing sequences and removal semantics
  • Dictionary<TKey,TValue>: lookup, update and missing keys
  • Choosing HashSet, Queue and Stack by operation
  • Lambdas, Func, Action and capturing variables

After this module you can

  • Write static methods with typed parameters and return values, overload a method by parameter list, and predict whether a change inside a method is visible to the caller.
  • Declare optional parameters with constant defaults, call methods with named arguments in any order, and write a params method that accepts zero or many values.
  • Write lambda expressions assigned to Func and Action, pass one to a method, and predict what variables a lambda captures including the for-loop pitfall.
04Classes and interfaces8 lessons, 4 to 6 hours

Lessons

  • Classes: fields, constructors and access modifiers
  • Properties: get, set, init and required
  • Records: value equality, with-expressions and deconstruction
  • Structs and classes: copy semantics
  • Nullable reference types: ?, ?., ?? and null checks
  • Inheritance: virtual, override, abstract and sealed
  • Interfaces and substitution: coding to a contract
  • Generics: type parameters and constraints

After this module you can

  • Declare a class with private readonly fields, a constructor that establishes a valid object, and public methods, and predict which members another class can access.
  • Replace public fields with properties, validate a value in a setter, and use init and required so an object cannot be created half-filled.
  • Write a generic method and a generic class with a type parameter, add a where constraint, and explain which calls the compiler accepts and rejects.
05Exceptions and resources6 lessons, 3 to 4 hours

Lessons

  • try, catch and finally: control flow and catch order
  • Throwing exceptions and validating arguments
  • Rethrowing, wrapping and exception filters
  • IDisposable and using: deterministic cleanup
  • Exceptions or Try methods: choosing the failure style
  • Reading stack traces and a console app's last-resort handler

After this module you can

  • Trace which blocks run for a given exception, order catch clauses from specific to general, and explain what finally guarantees.
  • Throw ArgumentNullException, ArgumentOutOfRangeException or InvalidOperationException from the right place with a clear message and parameter name, and explain which type fits a given failure.
  • Read an exception's type, message and top frames to find the failing line, and wrap a program's entry point in a last-resort handler that prints a short message and returns a non-zero exit code.
06LINQ fundamentals7 lessons, 3 to 5 hours

Lessons

  • IEnumerable<T> and the shape of a LINQ query
  • Where and Select: filtering and projecting
  • Ordering and paging: OrderBy, ThenBy, Skip and Take
  • Deferred execution and materialisation
  • Aggregates and element operators on empty data
  • GroupBy, ToDictionary and ToLookup
  • SelectMany and Join: flattening and combining sequences

After this module you can

  • Explain that a LINQ query reads a sequence without changing it, write the same filter in query syntax and method syntax, and name what IEnumerable<T> promises.
  • Chain Where and Select to filter records and project them to a new shape using an anonymous type or a record, including index-based overloads.
  • Flatten a sequence of sequences with SelectMany and combine two sequences on a key with Join, explaining what each does with unmatched elements.
07Async tasks7 lessons, 3 to 5 hours

Lessons

  • Task and Task<T>: promised work and what await does
  • async methods: signatures, return types and async void
  • Running tasks together with WhenAll and WhenAny
  • Cancellation with CancellationToken
  • Failures in async code: await and WhenAll
  • Shared mutable state: races, lock and Interlocked
  • Async streams: IAsyncEnumerable and await foreach

After this module you can

  • Describe a Task as a handle to work in progress, await a Task<T> to get its result without blocking a thread, and contrast Task.Delay with Thread.Sleep.
  • Write async methods returning Task or Task<T> with the Async suffix, explain why async void is avoided, and show that an exception thrown inside an async Task method surfaces when awaited.
  • Produce values asynchronously with `async IAsyncEnumerable<T>` and `yield return`, consume them with `await foreach`, and stop early with a token.
08Files and serialization8 lessons, 4 to 6 hours

Lessons

  • Paths and locations: Path.Combine, working directory and temp folders
  • Whole-file text I/O with the File class
  • Streaming text: StreamReader, StreamWriter and File.ReadLines
  • Parsing and formatting text safely: culture and delimiters
  • JSON with System.Text.Json: serialise and deserialise records
  • JSON robustness: missing fields, unknown fields and JsonException
  • Saving safely: temp file, move and restart persistence
  • Async file I/O with cancellation

After this module you can

  • Build file paths with Path.Combine, tell the current working directory from the executable's folder, and create a unique temporary directory for a run.
  • Read and write small text files with File.ReadAllText, ReadAllLines, WriteAllText and AppendAllText, and handle missing files and folders with the correct exception types.
  • Read and write files with ReadAllTextAsync and WriteAllTextAsync, pass a CancellationToken, and combine async file I/O with JSON.
09Application tests8 lessons, 4 to 6 hours

Lessons

  • Create a test project and run dotnet test
  • Arrange-Act-Assert and the Assert methods
  • Theories: [Theory], [InlineData] and boundary tables
  • Testing exceptions: Assert.Throws and Assert.ThrowsAsync
  • Test doubles by hand: fakes for clocks and repositories
  • Testing files and async code safely
  • Structuring a command-line application so it can be tested
  • Bug reports to regression tests, and what coverage can and cannot tell you

After this module you can

  • Create a solution with a class library and an xUnit test project referencing it, write one [Fact], run dotnet test, and read the passed, failed and skipped counts and the exit code.
  • Structure a test as Arrange, Act, Assert, use Assert.Equal with expected-first order, and choose between Equal, True, Contains and collection assertions with a precision for decimals.
  • Turn a written bug report into a failing test before fixing, keep it as a regression test, and explain what line coverage measures and why it does not prove correctness.

What you'll build

3 guided projects along the way, then a final project.

  • Command-line unit and ledger toolkit

    after module 3
  • Typed catalogue with validated models and LINQ reports

    after module 6
  • Persistent async store with tests

    after module 8

Final project

Typed C# command-line application with persistence and tests. Options: Task manager CLI / Expense tracker CLI / Equipment lending ledger CLI.

What you submit

Submission of the complete source in a solution containing a library, a console project and an xUnit project, with a README stating setup commands and the .NET SDK version used.

How it's reviewed

Trainer-reviewed demonstration, scored on: Correctness against supplied checks (30 percent) Design: separation of library, console and tests, interfaces for storage and clock (20 percent) Error handling and nullability discipline (15 percent).

Where you'll use it

  • Import a CSV of expenses and summarise it by month and category with LINQ.
  • Save and reload application data as JSON and cover the logic with xUnit tests.

Roles that use these skills

  • .NET Developer
  • Software Developer
  • Backend Developer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

What do I need before starting?

Completion of Programming Problem Solving or equivalent: the learner can trace a short program by hand, use variables, conditions and loops in pseudocode, and decompose a small problem. No prior C# or .NET experience is assumed; a computer that can install the free cross-platform .NET SDK (Windows, macOS or Linux) is required.

When do I get a certificate?

We do not issue certificates until you successfully build and demonstrate your live project. Staff issue certificates after review; nothing is issued automatically.

Be first in when C# Programming opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
FreeOpens soon
Notify me