C# Developer Interview Questions UK: 8 Real Questions and What Interviewers Want
Applying for a C# Developer job in the UK? Here is what you are likely to be asked. These questions come from our C# Developer question bank of 16 questions, written for UK employers at mid-level level.
Eight C# Developer interview questions, and what the interviewer is thinking
1. How do async and await work in C#, and what problems can they cause if used badly?
Why they ask: Async code is everywhere in .NET and misuse causes subtle production faults.
2. What is the difference between IEnumerable, IQueryable and List<T>, and when would you use each?
Why they ask: It tests understanding of deferred execution and its effect on database performance with Entity Framework.
3. Can you explain dependency injection in .NET and the difference between transient, scoped and singleton lifetimes?
Why they ask: Dependency injection is built into ASP.NET Core and wrong lifetimes cause real bugs.
4. How do you use Entity Framework Core efficiently, and what is the N+1 problem?
Why they ask: Data access performance is a frequent cause of slow .NET applications.
5. How would you structure and secure an ASP.NET Core Web API?
Why they ask: It checks practical architecture and security awareness for typical .NET work.
6. A page in your ASP.NET Core application has become very slow in production after a release. How would you investigate?
Why they ask: It shows a methodical approach to diagnosing live performance problems.
7. Tell me about a time you improved the performance of a C# application.
Why they ask: They want evidence that you can measure, diagnose and fix real performance issues.
8. Why do you want to work as a C# developer, and what do you enjoy about the .NET ecosystem?
Why they ask: They want to see genuine enthusiasm and awareness of the platform's direction.
A sample answer to question 1
How do async and await work in C#, and what problems can they cause if used badly?
async and await let a method yield control while awaiting an I/O-bound operation, so the thread returns to the pool instead of blocking. The compiler turns the method into a state machine, and the continuation resumes when the Task completes. In an ASP.NET Core API that means better throughput under load. The problems I watch for are calling .Result or .Wait() on a Task, which can deadlock or starve the thread pool, and async void, which should only be used for event handlers because exceptions can't be caught. I also pass a CancellationToken through the call chain, use ConfigureAwait(false) in library code, and avoid wrapping CPU-bound work in Task.Run on a web server. Where several independent calls are needed I use Task.WhenAll rather than awaiting each in sequence, and I make sure exceptions are handled properly when tasks are combined.
Common mistake to avoid: Saying async makes code run faster in itself; ignoring deadlocks and exception handling
Want the rest?
Full model answers, key points and common mistakes for all 16 questions are on the C# Developer interview questions page. The first five are free, no sign-up needed.

Comments