Compiler
A free lesson from Swipe Coding · C#, level 1 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
You now know that source code is human-readable, but the computer cannot execute it directly. This is exactly where the "compiler" comes in — a program that translates your source code into something closer to what a computer can process.
The C# compiler is called "Roslyn". It reads your .cs file(s) and translates them into a new form that can eventually be run. This process is called "compiling", and today it's most commonly triggered with a single command using the .NET command-line tools.
dotnet build
The modern C# compiler is called ____.
Important: the compiler does not translate your code directly into machine language for a specific processor. Instead, it produces a special intermediate form called "Common Intermediate Language", or CIL — more on that in the next lesson. This intermediate form is a big part of what makes .NET so flexible across different platforms.
The compiler also checks your code for errors. If, for example, you made a typo or forgot a bracket, the compiler stops with an error message and does not produce a translated file. This is called a "compile error" (or "build error").
What happens if your C# source code contains a typo?
The C# compiler translates source code directly into machine language for a specific processor.
Keep your streak going in Swipe Coding
Swipe through every level of C# on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.
Get the Swipe apps →