Common Intermediate Language (CIL)
A free lesson from Swipe Coding · C#, level 1 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
When the compiler (Roslyn) translates your source code, the result is not a finished file specifically for Windows, macOS, or Linux — it produces "Common Intermediate Language", or CIL for short. CIL is an intermediate form: no longer human-readable source code, but also not machine language for one specific processor.
CIL is packaged into a file called an "assembly", usually with the extension ".dll" (or ".exe" for a program you run directly). So after compiling, "Program.cs" ends up inside an assembly such as "Program.dll".
dotnet build // produces an assembly containing CIL, e.g. Program.dll
The C# compiler produces an intermediate form of code called ____.
What is special about CIL is that it is platform-independent. This means the very same assembly can be used on a Windows PC, a Mac, or a Linux server — the CIL itself is identical everywhere. No recompiling needed for each operating system!
CIL is different for each operating system and must be freshly generated for Windows, macOS, and Linux.
CIL still isn't what the processor directly understands, though. It is designed specifically to be read by another program — the Common Language Runtime (CLR), which you will learn about in the next lesson. It is exactly this combination of CIL and the CLR that lets the very same compiled program run on many different operating systems.
Why is CIL so important for C# and .NET?
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 →