Types and memory
- Value versus reference types, and where each lives - with the caveat that "structs are on the stack" is an oversimplification worth flagging.
- Boxing and unboxing, and the performance cost.
- `string` immutability and when `StringBuilder` earns its place.
- `IDisposable` and `using` - what the pattern guarantees and why finalisers are a last resort.
- `class` versus `struct` versus `record`, and when a record is the right default.
- Nullable reference types - what the compiler does and does not promise.
async/await, where candidates slip
- What does `await` actually do? It returns control to the caller and resumes on a continuation - it does not create a thread.
- `async void` - why it is dangerous outside event handlers, because exceptions cannot be caught by the caller.
- Deadlocks from `.Result` or `.Wait()` on an async call in a context with a synchronization context.
- `ConfigureAwait(false)` - what it does and where it matters.
- `Task.Run` versus awaiting an inherently asynchronous operation - and why wrapping I/O in `Task.Run` is usually wrong.
- `CancellationToken` - threading it through properly.
LINQ and collections
- Deferred execution - the query runs when enumerated, not when written, and what that means for a query over a database connection you have closed.
- `IEnumerable` versus `IQueryable`, and why the difference decides whether filtering happens in the database or in memory.
- Multiple enumeration - the bug where an expensive query runs twice.
- `First` versus `FirstOrDefault` versus `Single`, and what each throws.
.NET and the platform
Dependency injection lifetimes - singleton, scoped and transient - and the captive dependency problem when a singleton takes a scoped service. Then garbage collection at a high level, and how you would approach a memory problem in production. The system design half of a backend loop is in the system design cheat sheet.
How deep it goes by level
- Junior: the fundamentals above, explained clearly. Nobody expects production scars yet, and honesty about what you have not done reads better than bluffing.
- Mid-level: the same ground, plus an application you have shipped. Expect follow-ups asking why you made a particular choice rather than whether you know the syntax.
- Senior: an async deadlock or memory issue you diagnosed in production. At this level the language questions get shorter and the judgement questions get longer.
Whatever the level, the reliable way to prepare is to say your answers out loud rather than reading them. Most of what candidates lose in a C# interview is lost in the gap between knowing something and explaining it under observation - the method is in how to use AI for interview prep.
Where CoPilot Interview fits
Disclosure: we build an interview assistant, so treat this as a disclosed pitch. CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds, with a permanent free tier that needs no credit card.
Frequently asked questions
What are the most common C# interview questions?
Value versus reference types and boxing, how `async`/`await` works, `async void` and deadlocks from `.Result`, LINQ deferred execution, `IEnumerable` versus `IQueryable`, and dependency injection lifetimes in .NET.
Does await create a new thread in C#?
No. `await` returns control to the caller and resumes the remainder of the method as a continuation when the operation completes. For I/O-bound work there is usually no thread occupied at all while the operation is pending - describing it as threading is the most common mistake.
Why is async void dangerous?
Exceptions thrown in an `async void` method cannot be caught by the caller and typically crash the process, and the caller cannot await completion. It exists for event handlers, and everything else should return `Task`.
What is LINQ deferred execution?
A LINQ query describes work rather than performing it; the work happens when the sequence is enumerated. This causes real bugs - enumerating twice runs the query twice, and enumerating after disposing a database context throws.
Walk into the round with a second pair of eyes
CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds. The free tier is permanent: 15 minutes a day, no credit card.
Try it free