How this C# track works
- dotnet in the playground — write top-level statements or a
Programclass withMain; the dev runner compiles with a temporary .NET 8 console project and runs your code. UseConsole.WriteLinefor output. - Language + CLR focus — this track teaches C# syntax, OOP, LINQ, async, and .NET tooling. Web MVC, EF Core, and APIs live in the ASP.NET track after you finish here.
- Prerequisites — finish JavaScript (variables, functions) and Java (classes, interfaces). C++ or Python help compare memory and typing models.
Multi-project solutions, NuGet restore, and Unity Editor workflows run locally—lessons keep runnable snippets to Console.WriteLine where the sandbox requires it.
Install on your device (macOS, Linux, Windows)
Install .NET 8 SDK for C# and ASP.NET Core on your machine.
macOS
brew install --cask dotnet-sdkor script from dotnet.microsoft.com.
Linux
- Follow Microsoft docs for your distro: Install .NET on Linux (apt/dnf packages
dotnet-sdk-8.0).
Windows
winget install Microsoft.DotNet.SDK.8
Verify: dotnet --version shows 8.x.
Run code on this site (Backend & language playgrounds)
- Clone or open this project locally; copy
.env.exampleto.env. - Ensure
LEARNING_RUNNER_ENABLED=trueandLEARNING_RUNNER_URL=http://127.0.0.1:9999/v1/execute. - Terminal 1:
php artisan serve(orcomposer run devfor Laravel + Vite + runner together). - Terminal 2:
npm run runner— keep it running while you click Run on server.
Console app: dotnet new console -n Hello && cd Hello && dotnet run
C# is a modern, statically typed language for the .NET platform. It combines object-oriented design, functional features (LINQ, pattern matching), and async programming with tooling used in enterprise services, Unity games, and cloud workloads.
How this track differs from JavaScript and Java
After the JavaScript track, you know functions and dynamic typing in the browser. After Java, you know classes, interfaces, and JVM bytecode. C# feels familiar—properties, generics, exceptions—but targets the CLR with dotnet tooling and C#-specific features like LINQ and nullable reference types.
Unlike C++, C# is managed with garbage collection by default. Unlike PHP scripting, you compile before run. Web MVC, Razor, and EF Core live in the ASP.NET track after this language foundation.
What you will learn
- Syntax: types, control flow, methods, namespaces, and top-level statements
- OOP: classes, properties, inheritance, interfaces, records, and structs
- Collections and LINQ: lists, dictionaries, queries, and generics
- Modern C#: nullable references, pattern matching, async/await, exceptions, file I/O
- .NET tooling: CLI, project structure, NuGet, debugging, testing, Unity teaser
Playground setup
This topic uses server_compiled: the runner creates a temporary .NET 8 console project, compiles your snippet, and executes it. Use Console.WriteLine for output—top-level statements are supported without writing a Main method.
Important interview questions and answers
- Q: What runtime executes C#?
A: The Common Language Runtime (CLR) loads assemblies, JIT-compiles IL, and manages memory with a tracing garbage collector. - Q: Why learn C# after Java?
A: Syntax and OOP transfer directly—you then learn CLR, LINQ, and the path to ASP.NET or Unity.
Self-check
- In one sentence, what is the CLR?
- Where do MVC and EF Core belong in this curriculum?
Tip: Finish JavaScript and Java first—C# builds on familiar OOP with CLR-specific features like LINQ and nullable references.
Interview prep
- What is C# in one sentence?
A statically typed, managed language for the .NET platform combining OOP, LINQ, async/await, and modern pattern matching with cross-platform tooling.
- Why learn C# after Java?
Java teaches classes and interfaces on the JVM; C# maps those concepts to the CLR with properties, LINQ, and C#-specific features—essential for .NET and Unity careers.