Senior C# interview questions that test the runtime, not the syntax

Senior C# interview questions should test whether a candidate understands what the runtime does with their code: what await actually does, when memory gets allocated, which generic conversions are legal, and why the wrong DI lifetime leaks state between requests. Syntax is easy to memorize. Knowing why .Result can hang a server is what separates engineers who've shipped C# from those who've only read about it.
Most C# question lists are answer dumps, written to help a candidate pass. This one is written for the interviewer. It opens with a short junior and mid-level warm-up, then spends most of its time on senior questions, each with a model answer and a weak, adequate, and strong anchor for scoring, so you can run a fair screen even if you don't write C# yourself.
Key Takeaways
Our position: the most useful senior C# interview questions probe the runtime (async, memory, variance, lifetimes), not keyword definitions a candidate can memorize the night before.
Async is the fastest filter for experienced candidates. Someone who can explain why .Result deadlocks or starves the thread pool has debugged it in production.
Keep C# language questions and .NET framework questions in separate buckets, because a strong C# engineer may know a different web stack than yours.
Ask what .NET version the candidate has shipped on. C# 14 ships with .NET 10, and a senior engineer should know what changed recently.
Score every answer against a weak, adequate, and strong anchor written before the interview, so two interviewers grade the same answer the same way.
What senior C# interview questions should test in 2026
C# today runs on modern .NET, not the old Windows-only .NET Framework. Per Microsoft's .NET support policy, .NET 10 is the current long-term support release, and both .NET 8 and .NET 9 reach end of support on November 10, 2026. C# 14 is the latest released language version and ships with .NET 10.
That matters for your questions. A candidate who describes C# as "running on the .NET Framework" may be fine, but they may also be describing a codebase from a decade ago. Ask what version they've shipped on, and listen for whether their answers fit it.
The areas that separate senior candidates are async, memory, generics, modern language features, and the framework layer (dependency injection and Entity Framework Core). Keep the framework questions labeled as framework questions. Structured scoring is what makes all of this work: Sackett and colleagues' 2022 reanalysis ranked structured interviews as the top selection procedure, at roughly .42 validity.
Junior and mid-level warm-up questions
Spend five minutes here, even with senior candidates. A shaky warm-up tells you to adjust the rest of the round.
What's the difference between a value type and a reference type? A value type (a struct, an enum, or a built-in like int) holds its data directly and is copied on assignment. A reference type (a class) holds a reference, so two variables can point at the same object. Strong answers say "stack versus heap" is an oversimplification, because a value type inside a class lives on the heap with it.
What is boxing? Converting a value type to object or to an interface it implements, which allocates a copy on the heap. A strong answer names where it sneaks in, like storing an int in a non-generic collection, and says generics avoid it.
What is deferred execution in LINQ? A query like Where or Select runs when you enumerate it, and again every time you enumerate it. A strong answer names the bug this causes, hitting the database or a slow method twice, and fixes it with ToList() where appropriate.
What do nullable reference types guarantee? Only compile-time warnings. Microsoft's guide to nullable reference types is explicit that it's static analysis, so a null can still arrive at runtime from older code, deserialization, or a careless !.
Scoring note: a weak answer to the nullable question says nullable reference types "prevent null reference exceptions". A strong one says they move most of them to compile time, and knows where they can't.
Senior C# interview questions on async and concurrency
If you only have time for one area with experienced candidates, make it this one. These c# async await interview questions are where memorized answers break, and Microsoft's guide to asynchronous programming is the neutral reference when you need to settle an answer.
Why is async void dangerous? The caller can't await it, and an exception thrown inside it can't be caught by the caller; it's raised on the synchronization context and can crash the process. A strong answer says it's for event handlers only.
Why can .Result or .Wait() hang an app? With a synchronization context, as in a desktop UI, the blocked thread is the one the continuation needs, so it deadlocks. ASP.NET Core has no synchronization context, but blocking still ties up thread-pool threads and can starve the server under load. The strong answer knows both failure modes.
When do you use `ConfigureAwait(false)`? In library code that doesn't need to resume on the original context. Strong candidates note it matters less in ASP.NET Core apps and still matters in libraries.
Task or `ValueTask`? ValueTask avoids an allocation when a method often completes synchronously, such as a cache hit, but it should only be awaited once. Default to Task unless profiling says otherwise.
Why can't you await inside a `lock`? The compiler forbids it because the lock is tied to a thread, and the code after an await may resume on another one. A strong answer reaches for SemaphoreSlim.WaitAsync instead.
Scoring note: follow up with "what would you see in production if this went wrong?" and listen for a real story. A weak answer calls async "faster". A strong one explains that it frees threads rather than speeding up work.
Senior C# interview questions on memory, Span and the garbage collector
These advanced C# interview questions test whether a candidate has ever profiled an allocation-heavy service.
What does the garbage collector do with generations? New objects start in generation 0, survivors are promoted to 1 and then 2, and most collections only scan the young generations because most objects die young. Large objects (85,000 bytes and up) go to the large object heap. A strong answer connects this to real symptoms, like allocation-heavy hot paths causing frequent collections.
What is Span<T> for, and what can't you do with it? It's a stack-only view over contiguous memory (an array, stack memory, or native memory) that lets you slice without allocating. Because it's a ref struct, it can't be a field in a class, can't be boxed, and can't be held across an await.
What changed for spans in C# 14? The language added first-class support for Span<T> and ReadOnlySpan<T>, with new implicit conversions between them and arrays. Microsoft's notes say spans can now be extension method receivers and help with generic type inference, so span-based APIs need fewer explicit conversions.
Scoring note: the generations question separates seniors fastest. "The GC cleans up memory" is weak. Explaining why short-lived allocations are cheap but not free is strong.
Generics, variance and modern C# 14 features
Variance is a classic senior filter, because most developers use it every day without knowing its name. Microsoft's article on covariance and contravariance in generics is the reference.
Why can you assign an IEnumerable<Derived> to an `IEnumerable<Base>`, but not a List<Derived> to a `List<Base>`? IEnumerable<T> declares T as covariant (out), while List<T> is a class, and only interfaces and delegates can have variant type parameters. A strong answer adds that variance only applies to reference types, so IEnumerable<int> won't convert to IEnumerable<object>.
Where does contravariance show up? In in parameters such as IComparer<T> and Action<T>. A comparer written for a base class can sort a collection of a derived class, which feels backward until the candidate explains why it's type-safe.
What does the field keyword in C# 14 replace? The hand-written backing field. You can write a property accessor body, such as a null check in the setter, and the compiler synthesizes the field.
What does customer?.Order = GetCurrentOrder(); do when customer is null? In C# 14, null-conditional assignment evaluates the right side only when the left isn't null, so GetCurrentOrder isn't called at all. Candidates who assume it still runs will write side-effect bugs.
What does a primary constructor on a class give you, compared with a record? On a record, primary constructor parameters become public properties. On a class (since C# 12), they're parameters captured for use in the body, not properties, and they're not read-only by default.
Scoring note: on variance, a weak answer says "because of inheritance". A strong one names out and in and the reference-type limit without prompting.
.NET Core interview questions: DI lifetimes and EF Core
These are the senior .NET developer interview questions that belong in their own bucket. They test familiarity with a stack, which a strong engineer can learn, so weight them below the language questions unless the role needs someone productive in week one.
What are transient, scoped and singleton lifetimes? Transient is created each time it's requested, scoped is created once per request in a web app, and a singleton is one instance for the app's lifetime. Microsoft's guide to service lifetimes adds that singletons must be thread safe.
What's a captive dependency? A singleton that takes a scoped service in its constructor makes that service behave like a singleton, so per-request state leaks across requests. In the development environment, resolving a service from one with a longer lifetime throws by default. The fix is an explicit scope created with IServiceScopeFactory.
Why is a DbContext registered as scoped? AddDbContext registers it with a scoped lifetime by default, so each request gets its own context. A strong answer connects this straight back to the captive-dependency question.
Where does an N+1 query come from in Entity Framework Core? Loading a list, then touching a navigation property per item with lazy loading on (or querying inside the loop), so each item triggers its own query. The fix is eager loading with Include or projecting only what you need.
What's the difference between IEnumerable<T> and IQueryable<T> here? IEnumerable<T> runs the query in memory. IQueryable<T> builds an expression tree that EF Core translates into SQL, and calling AsEnumerable() too early pulls the whole table into memory.
How to score a senior C# answer: understood or memorized
Use the same three anchors for every question, and write them down before the interview.
Weak: recites a definition or keyword, and can't extend it when you change one detail.
Adequate: gives a correct explanation and a typical use, but needs prompting to reach the failure mode.
Strong: names the trade-off and the failure mode unprompted, often with a real example of hitting it.
This mirrors how we built the C++ interview questions and the closest language peer, our Java interview questions. For senior roles, pair this set with system design interview questions, because a strong C# engineer can still design a poor system.
Frequently asked questions
What are some common C# senior developer interview questions?
Senior C# interview questions usually cover async failure modes (async void, .Result deadlocks, thread-pool starvation), garbage collector generations, Span<T>, generic variance, recent language features like the C# 14 field keyword, and framework issues like captive dependencies and N+1 queries in Entity Framework Core.
What C# questions are asked for experienced developers?
C# interview questions for experienced developers skip definitions and ask about failure modes. Expect "why can this hang?", "where does this allocate?", and "what breaks if this singleton holds a scoped service?", followed by a scenario where the candidate has to explain what they'd see in production.
What is the difference between C# and .NET in an interview?
C# is the language, and .NET is the runtime and libraries it runs on, including frameworks like ASP.NET Core and Entity Framework Core. In an interview, keep them separate: language questions test how someone thinks in C#, and .NET Core interview questions test familiarity with a specific stack they could learn.
How do you test async/await knowledge in an interview?
Ask why async void is dangerous, why .Result can hang an app, and when ValueTask is worth using. Then follow up with a scenario: "this endpoint slows down under load, and you find .Result in it. What's happening?" A real answer mentions blocked threads.
Can you run a C# coding test without a C# engineer reviewing it?
Yes, for the first round. Expert Hire's coding test supports C# and scores submissions on correctness, efficiency, and code quality, and an AI interview can cover the reasoning with adaptive follow-ups. Your C# engineer should still review the finalists' report cards before the final round.
Running a senior C# screen when no one on your team writes C#
This happens more than people admit. A recruiter, or a hiring manager from a different stack, has to screen senior .NET developer candidates, and the hard part is the follow-up: you can read an anchor, but you may not know what to ask when an answer is vague. Our guide on how to conduct a technical interview covers the mechanics around it.
An AI interview handles that part. It scores every answer against the skills and weightage you set for the role, and follow-up questions adapt to what the candidate actually says. For hands-on work, the Expert Hire coding test supports C#, so your C# engineer reviews one report card per finalist instead of sitting through every first round.
If you want to see how a C# round can run without pulling an engineer in, look at how the Expert Hire coding test scores C# submissions.
By TK, Growth at Expert Hire. Last updated October 6, 2026. Reviewed by Anand Suresh, CPO at Expert Hire.
Ready to Transform Your Hiring?
Start your free trial to see how Expert Hire can help you screen candidates faster and smarter.