Skip to content

Beginner · Getting started with C# and .NET · topic 1 of 43 · 20 min

What C# and .NET are

Explanation

C# (said "C sharp") is a programming language made by Microsoft. .NET is the free, open-source platform that builds and runs C# programs on Windows, Linux and macOS. Your C# code is first compiled to an in-between form called IL, and the .NET runtime turns that into machine code when the program runs.

Why learn C#?

C# is one of the most used languages in companies. Banks, insurance firms, hospitals, government portals and many Indian IT service companies run their business software on .NET. C# is also the language of the Unity game engine, so many mobile and PC games are written in it. One language opens two very different careers: business software and games.

C# was released by Microsoft in 2000. It looks a lot like Java and C++: curly braces, semicolons and types. If you learn C# well, picking up Java, TypeScript or Kotlin later is much easier.

Language versus platform

A language is the set of words and rules you write: if, for, class and so on. A platform is everything that makes your program actually run. C# is the language. .NET (said "dot net") is the platform.

Think of it like this: Think of C# as Hindi or English, the language you write a letter in. .NET is the whole postal system: the post office that checks your letter, the trucks that carry it and the postman who delivers it. A letter is useless without the postal system, and the postal system needs letters to carry.

The parts of .NET

WordWhat it means
SDK (Software Development Kit)What developers install. It has the compiler, the dotnet command and project templates.
RuntimeWhat is needed only to RUN a finished program. The SDK already includes it.
CLR (Common Language Runtime)The engine inside the runtime. It loads your program, manages memory and runs the code.
BCL (Base Class Library)Thousands of ready-made classes: Console, File, List, DateTime, HttpClient and more.
IL (Intermediate Language)The in-between code your C# is compiled to. It is stored in .dll files.
JIT (Just-In-Time) compilerPart of the CLR. It turns IL into real machine code for your CPU while the program runs.

How your code runs, step by step

  1. You write C# source code in .cs files.
  2. The C# compiler (named Roslyn) checks it for mistakes and turns it into IL inside a .dll file.
  3. When you start the program, the CLR loads the .dll.
  4. The JIT compiler turns each piece of IL into machine code the first time it is needed.
  5. The garbage collector (GC) frees memory you no longer use, so you do not free memory by hand as in C or C++.

Code that runs under the CLR, with automatic memory management, is called managed code. This two-step design is why the same .dll can run on Windows, Linux and macOS: each machine has its own runtime that turns the same IL into its own machine code.

.NET Framework versus modern .NET

You will see two names online. .NET Framework (versions 1.0 to 4.8.x) is the old, Windows-only version. It is still used in older company projects, but it gets no new features. Modern .NET (first called .NET Core, then simply .NET 5, 6, 7, 8, 9, 10) is cross-platform and is where all new work happens. This course uses modern .NET.

Versions and support

A new .NET version comes out every November. Even-numbered versions (8, 10) are LTS, Long Term Support, which means Microsoft fixes them for three years. Companies usually pick an LTS version. .NET 10 is the current LTS, released in November 2025 together with C# 14. Always check dotnet.microsoft.com for the latest version before you install.

Careful: Common mistake: following a tutorial for .NET Framework 4.x (with web.config files, packages.config and Windows-only tools) while you have modern .NET installed. Check the date and version of any tutorial. Look for "ASP.NET Core" and ".NET 8" or newer.

What people build with C#

  • Web APIs and websites with ASP.NET Core (online banking, booking and e-commerce back ends).
  • Desktop apps for Windows with WPF and Windows Forms (billing software, hospital systems).
  • Games with Unity (mobile games, PC games, AR and VR apps).
  • Cloud services on Microsoft Azure, and background jobs that process files and messages.
  • Cross-platform mobile and desktop apps with .NET MAUI.
Tip: You do not need Windows. Everything in this course works on Windows, Linux and macOS with the free .NET SDK and a free editor such as Visual Studio Code.

Need help?

Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.

Try:

Watch the lesson

What C# and .NET are · 1/7

C# = the language .NET = the platform

Welcome to C# and .NET. In this lesson you will learn what each name means and how a C# program runs.

Prefer a video by a teacher? Find free videos on “what is .NET and C# explained for beginners CLR IL JIT” on YouTube ↗

In real life: One program, three kinds of computers

An insurance company in Pune builds its claims API in C#. Developers write code on Windows laptops, the testers use MacBooks, and the live servers run Linux in the cloud. Because the code is compiled to IL and each machine has a .NET runtime, the same build runs everywhere without changes.

csharp
// The same Program.cs runs on Windows, Linux and macOS
Console.WriteLine("Claims service started");
Console.WriteLine(Environment.OSVersion);
Environment.OSVersion shows which operating system the program is running on.

Practice (0/3 done)

Task 1 · Question

Which one is the programming language, and which is the platform?

Task 2 · Question

What does the C# compiler produce from your .cs files?

Task 3 · Practice

In your own words, write 4 to 6 lines explaining to a friend what happens between writing Program.cs and seeing output on the screen. Use the words compiler, IL, CLR and JIT.

Quick quiz

Question 1

1.What does CLR stand for?

Question 2

2.Which statement about .NET Framework 4.8 is true?

Question 3

3.Which .NET versions are Long Term Support (LTS)?

Question 4

4.What does the garbage collector do?

Question 5

5.Why can the same .dll run on Windows and Linux?

Read more (free)

Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.

What does CLR stand for?

Answer: Common Language Runtime

The Common Language Runtime is the engine that loads and runs .NET programs.

Which statement about .NET Framework 4.8 is true?

Answer: It is the older, Windows-only version that gets no new features

.NET Framework is the legacy Windows-only line. Modern .NET (5 and later) is cross-platform.

Which .NET versions are Long Term Support (LTS)?

Answer: Even-numbered ones like 8 and 10

Even-numbered releases are LTS with three years of support.

What does the garbage collector do?

Answer: Frees memory that the program no longer uses

The GC automatically reclaims memory from objects nothing refers to any more.

Why can the same .dll run on Windows and Linux?

Answer: Because it contains IL, and each machine's runtime turns IL into its own machine code

IL is not tied to one CPU or OS. The runtime on each machine compiles it with the JIT.

Which is a realistic statement about fresher .NET salaries in India?Related

Answer: Commonly around ₹3.5 to 7 LPA, varying by city, company and skills

Ranges vary widely; treat them as a guide.

From Career paths with C# and .NET in India

What do you need to install to BUILD C# programs?Related

Answer: The .NET SDK

The SDK has the compiler and the dotnet tools. The runtime alone can only run built apps.

From Installing .NET and using the dotnet CLI

Which statement about async/await is correct?Related

Answer: It frees the thread while awaiting I/O and resumes later

async is about not blocking during waits.

From The C# and .NET interview questions asked most often

How often does a new Go version usually come out?Related

Answer: About every six months (February and August)

Go has a regular release cycle: one major release in February and one in August.

From What Go is and why people use it

Pass the quiz (60% or more) or mark this topic as done when you are ready.

Your progress is saved on this device only.

Next steps

  1. 4 more topics in “Getting started with C# and .NET” before its exam: Installing .NET and using the dotnet CLI, Your first program: output, input and the Main method, Types and variables, Operators, conversions and parsing input.
  2. Module 1 exam: Getting started with C# and .NET · 13 questions · 20 min, without help. 5 topics of this module still to finish first.
  3. Then the next module, Decisions, loops and methods. 43 topics left in the course before the final exam.