Guided course · C# Internals and Performance
C# Memory and the .NET Runtime: Value Types, Boxing, Spans, GC and JIT
- How C# really runs, the way interviewers ask about it.
- What a variable holds, where values live, and how big an object is.
- Boxing, and where it hides in interfaces, generics and collections.
- ref, out and in, defensive copies, ref safety and ref struct.
- Span, Memory, stackalloc and ArrayPool for work without garbage.
- The garbage collector, large objects, GC modes, Dispose and leaks.
- IL, the JIT, tiered compilation, Native AOT, and measuring memory honestly.
Intermediate6 modules · 23 lessons · 5 h 36 min · 17 practice tests · 2 free
Module 1 · Values, References and Objects
4 lessons · 58 min- 01Value Types vs Reference Types in C#: What a Variable Really HoldsFree, 1 practice test15 min
- 02Stack vs Heap in .NET: Where C# Values Really LiveFree15 min
- 03Inside a .NET Object: Header, Method Table and Object Size (included with Full Access), 1 practice test14 min
- 04Struct or Class in C#: Designing Value Types That Stay Fast and Correct (included with Full Access), 1 practice test14 min
Module 2 · Boxing
2 lessons · 31 minModule 3 · ref, in, out and Ref Safety
4 lessons · 59 min- 07ref, out and in Parameters in C#: Passing Variables, Not Values (included with Full Access), 1 practice test15 min
- 08in, ref readonly and Defensive Copies: Passing Large Structs in C# (included with Full Access)13 min
- 09Ref Locals and Ref Returns in C#: Safe Aliases Into Arrays and Collections (included with Full Access), 1 practice test16 min
- 10Ref Safety in C#: Escape Rules, scoped, ref Fields and ref struct (included with Full Access), 1 practice test15 min
Module 4 · Spans and Buffers
5 lessons · 1 h 13 min- 11Span<T> and ReadOnlySpan<T> in C#: Slicing Without Copying (included with Full Access), 1 practice test14 min
- 12stackalloc and ArrayPool<T> in C#: Temporary Buffers Without Garbage (included with Full Access)14 min
- 13Memory<T> and Buffer Ownership in C#: Buffers Across await (included with Full Access), 1 practice test14 min
- 14Parsing Text Without Temporary Strings: Spans, string.Create, SearchValues and UTF-8 (included with Full Access), 1 practice test15 min
- 15Writing and Framing Bytes: IBufferWriter<T>, System.IO.Pipelines and Binary Formats (included with Full Access), 1 practice test16 min
Module 5 · The Garbage Collector
5 lessons · 1 h 12 min- 16How the .NET Garbage Collector Works: Roots, Marking, Compaction and Generations (included with Full Access), 1 practice test14 min
- 17Large Objects and Pinning in .NET: the LOH, the POH and Frozen Objects (included with Full Access), 1 practice test14 min
- 18GC Modes in .NET: Workstation, Server, Background GC, DATAS and Regions (included with Full Access), 1 practice test13 min
- 19Finalizers, IDisposable and SafeHandle: Cleanup the GC Does Not Do (included with Full Access), 1 practice test16 min
- 20Memory Leaks in .NET: What Keeps Objects Alive and How to Find It (included with Full Access), 1 practice test15 min
Module 6 · The JIT and Measuring
3 lessons · 43 min- 21From C# to Machine Code: IL, the JIT, Tiered Compilation, PGO, ReadyToRun and Native AOT (included with Full Access), 1 practice test14 min
- 22What the .NET JIT Optimizes Away: Inlining, Devirtualization and Escape Analysis (included with Full Access)15 min
- 23Measuring Memory and Speed in .NET: BenchmarkDotNet, Counters and Honest Numbers (included with Full Access)14 min
TechInterviewNotes Editorial Team ·