.NET Academy

What is .NET?

The pieces that make up .NET and how they work together to run your code.

8 min read

You will learn

  • Explain what .NET is in one sentence
  • Name the four main parts — language, SDK, runtime and class library
  • Tell the difference between modern .NET and the old .NET Framework
  • Know what kinds of apps you can build with .NET

The one-sentence answer

.NET is a free, open-source platform for building and running applications — websites, APIs, desktop apps, mobile apps, games, cloud services and command-line tools — on Windows, macOS and Linux.

"Platform" is the key word. .NET is not one program; it's a set of pieces that work together. Once you know what each piece does, a lot of confusing terms suddenly make sense.

The four pieces

PieceWhat it isAnalogy
LanguagesC#, F# and Visual Basic. You write your code in one of these. C# is by far the most popular.The language you write a recipe in
SDK (Software Development Kit)The tools to build apps: the compiler, the dotnet command-line tool, project templates.The kitchen equipment
Runtime (CLR — Common Language Runtime)The engine that runs your compiled app: it turns it into machine code, manages memory and handles errors.The chef who follows the recipe
Base Class Library (BCL)Thousands of ready-made types: string, List<T>, File, HttpClient, DateTime…The pantry full of ingredients

On top of these sit app frameworks — specialized libraries for particular kinds of apps, like ASP.NET Core for web apps and APIs, or Entity Framework Core for databases. You'll learn both later.

From your code to a running program

Here is what happens when you build and run a C# program:

  1. You write C# source code in .cs files.
  2. The compiler (part of the SDK) translates it into IL — Intermediate Language — and packages it in an assembly (a .dll file).
  3. When you run the app, the runtime loads the assembly and its JIT compiler turns the IL into real machine code for your CPU, just in time.
Program.cs         ← you write C#
    │  compile (SDK)
    ▼
MyApp.dll (IL)     ← same file on every OS
    │  JIT at runtime (CLR)
    ▼
machine code       ← runs on your CPU

Why the middle step?

IL is the same on every operating system. That's how a single .dll can run on Windows, macOS and Linux — each machine's runtime converts it to its native code. You'll dig into IL, JIT and ahead-of-time (AOT) compilation in the How compilation works module.

Your first program

This is a complete, valid C# program:

Console.WriteLine("Hello, World!");
  • Console is a class from the Base Class Library that talks to the terminal.
  • WriteLine is a method on it that prints text followed by a new line.
  • The text in double quotes is a string.
  • The semicolon ; ends the statement.

You didn't have to write a class or a Main method — modern C# lets you write top-level statements for small programs, and the compiler adds the boilerplate for you.

.NET vs .NET Framework

You will see both names online, and it's easy to mix them up:

  • .NET Framework (1.0 → 4.8, 2002–2019) — the original. Windows-only. Still runs many older business apps, but it only gets security fixes now.
  • .NET Core (2016–2020) — a rewrite that was cross-platform, faster and open source.
  • .NET 5, 6, 7, 8, 9… — in 2020 ".NET Core" was renamed simply .NET. This is modern .NET, and it's what this course teaches.

Watch out

When you search for help, check whether an answer is about .NET Framework or modern .NET. Old answers about web.config, System.Web or Global.asax usually belong to the Framework era.

What can you build?

  • Web APIs and websites — ASP.NET Core (one of the fastest web frameworks available)
  • Cloud services and microservices — runs great in Docker and on Azure, AWS or GCP
  • Desktop apps — WPF, WinForms, .NET MAUI
  • Mobile apps — .NET MAUI for iOS and Android
  • Games — the Unity engine uses C#
  • Command-line tools, background workers, IoT…

Key takeaways

  • .NET = languages + SDK + runtime + class library, plus frameworks on top.
  • The SDK builds your code into IL; the runtime runs it.
  • Learn modern .NET (5+), not the legacy .NET Framework.

Exercise

Every journey starts with "Hello, World!". Change the program so it prints exactly "Hello, .NET!" (without the quotes).

Program.cs
Loading editor…

C# runtime not loaded

Hint 1

Console.WriteLine prints whatever text you put between the quotes, followed by a new line.

Hint 2

Only the text inside the quotes needs to change.

Show solution
Console.WriteLine("Hello, .NET!");

Quiz

4 questions · 3 correct to pass
  1. 1.Which part of .NET actually executes your compiled program?

  2. 2.You want to run an already-built .NET app on a server, but not develop on it. What do you install?

  3. 3.What is the "Base Class Library" (BCL)?

  4. 4.Which statement about .NET Framework vs modern .NET is true?

To complete this lesson

  • ○ Solve the exercise
  • ○ Pass the quiz (3/4 correct)