📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.

Phase 5 — CLR and .NET Runtime Internals

How .NET runs your code: the CLR, assemblies, JIT and AOT, runtime type layout and dispatch, the Roslyn compilation pipeline, and garbage collection.

  1. How does the using statement work in C#, and what are the common bugs with using declarations, deferred execution and exceptions?

    using statement versus declaration, lowering to try/finally, disposal order, pattern-based using for ref structs, and bugs with returned objects, deferred LINQ and Dispose exceptions.

    Mid-Level CodeReview Garbage Collection Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  2. When should a type implement IAsyncDisposable, how does await using work, and how do you implement both IDisposable and IAsyncDisposable correctly?

    IAsyncDisposable and ValueTask DisposeAsync, await using lowering, ConfigureAwait on disposal, the DisposeAsyncCore pattern, and DI async scopes.

    Senior Coding Garbage Collection Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  3. What are WeakReference and ConditionalWeakTable in .NET, and when are weak references the right tool?

    Short and long weak references, WeakReference of T, ConditionalWeakTable for attached data, weak events, why weak caches are unreliable and their GC cost.

    Senior Theory Garbage Collection Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  4. How do you investigate a memory leak in a .NET service in production, step by step?

    Confirming a leak, managed versus native growth, dotnet-counters, dotnet-gcdump comparisons, dotnet-dump and gcroot, common leak sources and verifying the fix.

    Senior Debugging Garbage Collection Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  5. What is GC pressure in .NET, how do you measure it, and how do you reduce it (including GC.AddMemoryPressure for native memory)?

    Allocation rate and time in GC as pressure metrics, practical reduction techniques, GCConserveMemory, AddMemoryPressure for native allocations, and RefreshMemoryLimit.

    Senior Theory Garbage Collection Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me