C# compileert niet rechtstreeks naar machine-code. Het compileert naar IL (Intermediate Language) — een platform-onafhankelijke bytecode — die de CLR uitvoert, met behulp van JIT (Just-In-Time) compilatie om IL tijdens runtime naar native machine-code om te zetten. AOT (Ahead-Of-Time) is een alternatief dat tijdens het bouwen naar native code compileert.
De execution pipeline
C# source (.cs)
│ C# compiler (roslyn)
▼
IL bytecode (in a .dll/.exe assembly) ← platform-INDEPENDENT intermediate code
│ CLR loads it; JIT compiles IL → native code AT RUNTIME (per method, as called)
▼
Native machine code → executes on the CPU
