C# tidak dikompilasi langsung ke kode mesin. C# dikompilasi ke IL (Intermediate Language) — bytecode yang tidak bergantung pada platform — yang dijalankan oleh CLR, menggunakan kompilasi JIT (Just-In-Time) untuk menerjemahkan IL ke kode mesin asli saat runtime. AOT (Ahead-Of-Time) adalah alternatif yang mengompilasi ke kode asli saat build time.
Pipeline eksekusi
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
