Phase 4 — Advanced C#
Generics, delegates and events, LINQ, advanced and modern C# 14 language features, and memory-oriented C# (spans, ref types, pooling) for .NET 10 engineers.
-
A service using ArrayPool<T> intermittently returns corrupted data, and once returned another customer's data in a response. How do you debug and fix ArrayPool misuse? Cover use-after-return, double return, assuming the rented length, not clearing sensitive data, returning foreign arrays, and the tools and test techniques that catch these bugs.
Debugging ArrayPool<T> misuse: lifetime bugs, length assumptions, clearing, diagnostics and safe patterns.
Senior
Debugging
Memory-Oriented C#
· 🔗 3 follow-ups · 🛠 1 real-world
-
How do MemoryPool<T> and IMemoryOwner<T> work, and when would you use them instead of ArrayPool<T>? Explain renting and disposing owners, why the buffer can be larger than requested, ownership transfer between components, how System.IO.Pipelines uses a memory pool, writing a custom pool or MemoryManager<T> for native or pinned memory, and common mistakes.
MemoryPool<T> and IMemoryOwner<T>: ownership-based pooling, pipelines and custom memory managers.
Senior
Theory
Memory-Oriented C#
· 🔗 3 follow-ups · 🛠 1 real-world