16 questions · C# / .NET Developer

C# / .NET Developer Interview Questions

A hiring manager's question bank for C# and .NET engineers. Use these to tell apart candidates who can wire up an ASP.NET Core API from those who actually understand the runtime underneath it.

A good C# developer is comfortable across a wide stack: the language itself, the CLR that runs it, the ASP.NET Core request pipeline, and the data layer that EF Core sits on top of. The risk in a .NET interview is staying on the surface — asking what a delegate is, or what `using` does — and never finding out whether the candidate has shipped and maintained a real service. The questions below go deeper. They probe how the garbage collector's generational model affects allocation-heavy code, why `async`/`await` exists and how it differs from raw threads, how `IEnumerable` deferred execution can quietly turn one query into N, and how dependency injection lifetimes (transient, scoped, singleton) cause subtle bugs when mixed wrong. For full-stack .NET roles, mix one CLR question, one async question, one EF Core question and one ASP.NET Core middleware or design question — that spread reveals both breadth and the depth that separates a senior from someone who has only followed tutorials. Strong candidates talk about trade-offs: when to use `record` over `class`, when `ConfigureAwait(false)` matters, when to drop to raw SQL instead of LINQ. Watch for people who reason about the runtime, not just the syntax, and who can explain a bug they chased through async stack traces in production.

How to use these questions

Pick six to eight questions spanning two or three categories rather than running the whole list. Treat each as a conversation starter — when a candidate gives a textbook answer, follow with "and when would that break in production?" to test depth.

CLR, Memory & Language

  1. Explain how the .NET garbage collector's generational model works and why it matters for performance.
  2. What is the difference between a value type and a reference type, and what happens when you box one?
  3. When would you choose a `record` over a `class`, and what does the compiler give you for free?
  4. What does the `IDisposable` pattern solve, and when does `using` not protect you?

Async & Concurrency

  1. Walk me through what `async`/`await` actually does — how does it differ from creating a thread?
  2. When and why would you use `ConfigureAwait(false)`?
  3. What is the danger of `async void`, and where is it the only acceptable choice?
  4. How would you debug a deadlock caused by blocking on an async call with `.Result`?

LINQ & EF Core

  1. Explain deferred execution in LINQ and how it can quietly cause an N+1 query problem.
  2. How do you spot and fix an N+1 in Entity Framework Core?
  3. What is the difference between `IQueryable` and `IEnumerable`, and why does it matter for performance?
  4. When would you drop out of LINQ and write raw SQL or a stored procedure?

ASP.NET Core, DI & Testing

  1. Explain the difference between transient, scoped and singleton service lifetimes, and give a bug each can cause.
  2. How does the ASP.NET Core middleware pipeline work, and where would you add cross-cutting concerns like logging?
  3. How do you write a unit test for a controller that depends on a database, without hitting a real database?
  4. A new endpoint is slow under load. How do you find out whether the bottleneck is the database, serialization, or async exhaustion?

Tips for interviewing C# / .NET candidates

  • Probe the runtime, not the syntax — ask why async exists, not what `await` keyword spells.
  • Mix one EF Core question in; data-layer mistakes (N+1, lazy loading) cause most real .NET performance bugs.
  • Let candidates reason about DI lifetimes out loud; the wrong scope choice is a classic senior-vs-junior tell.
  • Reward candidates who name concrete trade-offs (record vs class, raw SQL vs LINQ) over those who recite definitions.
  • Ask about a production bug they personally debugged — async deadlocks and disposal leaks expose real experience fast.

Frequently asked questions

Hiring C# / .NET developers? JuggleHire ranks, screens, and schedules candidates for you.

JuggleHire goes beyond simple job posting. Leverage custom forms, powerful screening filters, and automated social media previews to find the perfect fit for your team.