Roadmap › 1. .NET › Step 9
CLR

.NET Internals — CLR, CTS, CLS, IL, JIT, Memory Management & Garbage Collection

Every .NET version from .NET Framework 1.0 to .NET 10, the .NET architecture (CLR, BCL, CTS, CLS), compilation from C#/VB.NET to IL to machine code (Roslyn, JIT, tiered compilation, ReadyToRun, Native AOT), assemblies, manifests, metadata, GAC and strong names, AppDomains vs AssemblyLoadContext, type loading and method tables, stack and heap, value vs reference type layout, the garbage collector in depth (generations, LOH, POH, workstation/server, background GC), finalization, IDisposable, memory leaks and diagnostics, threading and the thread pool, async internals and exceptions inside the CLR.
Quick revision for interview day. Print it or save it as a PDF.

Architecture in one line

Source → Roslyn → assembly (IL + metadata + manifest) → host starts CLR → loader + type loader → JIT (tier 0 → tier 1 + PGO) → native code → GC manages heap.

Version map

Framework 1.0 (2002) → 2.0 generics → 3.5 LINQ → 4.0 TPL → 4.5 async → 4.8 last (4.8.1 ARM64). Core 1.0 (2016) → 2.1 LTS → 3.1 LTS. .NET 5 (2020) → 6 LTS → 7 → 8 LTS → 9 → 10 LTS (2025). Even = LTS 3 yrs, odd = STS 2 yrs.

GC essentials

Gen 0 → 1 → 2; LOH ≥ 85,000 bytes (not compacted); POH for pinned; Workstation vs Server (+ background, DATAS); roots = stacks, statics, handles; finalizers delay collection; never GC.Collect() in normal code.

Dispose rules

using/await using everything disposable · SafeHandle instead of finalizers · Dispose(bool) + GC.SuppressFinalize for the full pattern · dispose what you own only.

Diagnose

dotnet-counters (live) · dotnet-gcdump (heap) · dotnet-dump analyze (dumpheap -stat, gcroot) · dotnet-trace (CPU/events) · BenchmarkDotNet MemoryDiagnoser.