Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Courses / Programming

        C# tutorial with .NET coding practice

        Learn C# by writing code, reading compiler errors and fixing failed tests. Work through 60 lessons and 297 exercises, from methods and collections to async services, memory ownership and a slow-report case study.

        Start lesson 1Practice interviewTake the assessmentPractice the first unit of every course. No account needed.
        60lessons
        297checked exercises
        9projects, cases and exams
        Prepares you for C# and .NET developer interviews and the topics of the Foundational C# with Microsoft certification

        What you will be able to do

        • Write methods, collections, records and generic types with explicit input contracts
        • Build LINQ reports with stable ordering, deliberate materialization and defined empty-input behavior
        • Pass cancellation through asynchronous operations and clean up after a failure
        • Practice DI lifetimes, API responses, EF Core queries and tests with clearly labeled teaching stand-ins
        • Use spans and resource ownership correctly, then investigate a slow report without changing its result

        Who it is for

        You are learning C# for a .NET role
        Start with language foundations and build toward the service, memory and testing questions that need working code.
        You already program in another language
        Test C# boundaries such as value copies, nullable references, deferred queries and deterministic disposal.

        What you can practice free

        Unit 1, First steps in C#: 6 lessons and 33 checked exercises, with no account or card.

        Start the free unit

        The rest of the course opens with a One Course or All Access plan. See plans and prices

        Keep going in C# and .NET

        Choose access here. Your course is already selected.

        One Course

        Every lesson, project and mock exam in C# and .NET.

        Loading price/ month

        Billed monthly. Cancel any time.

        All Access

        Every course, exam and project, plus the Interview Hub.

        Loading price/ month

        Billed monthly. Cancel any time.

        Projects, case studies and mock exams

        Learn C# by writing code that the real C# compiler builds in your browser and runs on the .NET 10 runtime, with tests that check it the moment you run it. Start with methods, numbers, strings, conditions, loops and collections, then classes, records, interfaces and generics.

        The later levels cover what .NET jobs ask for: LINQ, exceptions and nullable reference types, async and await, dependency injection, minimal APIs, Entity Framework Core basics, unit tests with xUnit, and performance. Interview question sets and timed practice exams close the course.

        Beginner

        FreeNo account or card needed. Every lesson in this unit is yours to practice.

        First steps in C#

        Methods and types, numbers, strings, conditions and loops.

        6 lessons

        Collections

        Arrays and ranges, List<T>, Dictionary, HashSet, Queue, Stack and text splitting.

        6 lessons

        Classes and objects

        Constructors, properties, methods, encapsulation and static members.

        4 lessons

        Intermediate

        Records, interfaces and inheritance

        Records and value equality, enums and structs, interfaces, inheritance and pattern matching.

        6 lessons

        LINQ

        Query collections with LINQ: filters, sorting, aggregates, grouping, joins and deferred execution.

        6 lessons

        Exceptions, nulls, generics and delegates

        Exceptions, nullable reference types, generics, delegates and events, then an eight-step order system project.

        6 lessons

        Advanced

        Async and await

        async and await, Task.WhenAll and WhenAny, cancellation, the common async mistakes, iterators and async streams.

        6 lessons

        .NET services: DI, APIs, data and tests

        Dependency injection, minimal APIs with validation, EF Core basics and relations, unit tests with xUnit, practice and an orders API project, each on a labelled stand-in.

        7 lessons

        Expert

        Expert C#: performance, memory and review

        Make C# report code efficient and predictable with measured allocations, shared memory views, explicit ownership, code review and a carried case.

        7 lessons

        Interviews and timed practice

        Coding interview sets at three levels, .NET concept questions, and two timed practice exams on the Foundational C# topics.

        6 lessons

        Targeted C# practice

        Use the C# exercises, keep the syntax reference nearby or review .NET interview questions. The expert lessons cover spans, memory, resource disposal and idiomatic review before the slow-report case.

        Practice control logic in the PLC programming course, using a ladder editor and a Structured Text teaching subset with visible input and output traces.

        For the database layer of a C# service, practice PostgreSQL constraints and queries. Test the table rules and examine query plans before integrating data access.

        Events behind the report

        If your data starts as application events, practice Apache Kafka to trace record keys, partition order and consumer offsets before you analyze the resulting table.

        Provision the environment around a .NET service in the Terraform course. Compare an application change with the separate plan that creates or updates its infrastructure before either reaches a release.

        Practice working with coding agents to scope a change, review the proposed code and check its tests in a scripted workspace.

        For features that consume model output, practice request and tool contracts. Write Python against a scripted client, validate the output and preserve call identity before applying the same boundaries in another language.

        Continue with Go programming to practice interfaces, error handling and HTTP handlers in another compiled language.

        Cloud service boundaries

        A C# test proves behavior inside its runtime, not a healthy cloud deployment. Use the Google Cloud course and Cloud Run guide to separate image configuration, workload identity and release evidence. The local cloud console does not execute your C# application.

        For an Oracle infrastructure role, the OCI course adds compartments, policy statements and container-function configuration. Its local definitions do not execute your application.

        For an application operated on AWS, the CloudOps SOA-C03 guide adds alarm diagnosis, recovery and release evidence. The local cloud tasks don’t run your C# service.

        For a C# service hosted in Azure, practice App Service plans, deployment slots and configuration swaps in the Azure course. Verify application behavior with the original request and release checks. For the architecture behind the application and its data, use the cloud recovery interview case to trace durable acceptance, portable exports and a controlled cutover.

        Common questions

        Do I need to install .NET or Visual Studio?

        Your code compiles with Roslyn and runs on .NET 10 for WebAssembly inside the browser. The first run downloads the compiler and runtime.

        Which C# version does the browser compile?

        The pinned Roslyn 4.14 compiler builds C# 13 against .NET 10 libraries, with nullable reference types enabled. C# 14 features are outside this editor.

        Does the course host an ASP.NET Core server?

        The language and standard libraries run as real C#. The ASP.NET Core, EF Core, dependency injection and xUnit exercises use labeled teaching stand-ins. They do not host a web server or prove relational database behavior.

        Where can I prepare for an interview?

        The .NET interview questions explain the concepts. The C# Interview Hub gives you independent practical rounds, and the skills assessment checks your coverage.

        Does completing the course award a Microsoft certification?

        It does not award an external credential. The certification guide links to the current provider route and explains how our independent practice differs.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.