From September to November 2024 I had a “pleasure” of looking for a new programming job as a senior full stack .NET developer. I was dedicated full time to this process as I have still been on a sabbatical break. It took me a bit more than 2 months, during which I submitted around 150 well-crafted applications, took part in 25 full technical recruitment processes and was asked hundreds of .NET interview questions.
In this article, I’m sharing a compiled list of the most popular .NET interview questions I was asked during all those interviews. They represent real questions asked on job interviews for a software developer with almost 10 years of experience. Hope you enjoy it 🙂
Technical .NET Interview Questions
- What’s the difference between a
class
and aninterface
? - What’s the difference between an
abstract class
and aninterface
? - What is the difference between a
class
and astruct
? - Describe the difference between overriding and overloading in C#
- Can a
structure
havevirtual
methods? - Explain the difference between
GET
,POST
andPATCH
in HTTP APIs - Is there any limit go the
GET
request’s length? If yes, where is such a limit configured? What aboutPOST
? - How would you secure your WebAPI?
- What is the flow of generating, obtaining and passing JWT token in a .NET application?
- When using JWT tokens in an API, how does the server ensure it talks to a legitimate client?
- Is the API security compromised when the user’s JWT token is stolen?
- What is the difference between
IEnumerable
andIQueryable
in the context of Entity Framework? - What are the dependency injection scopes in ASP.NET?
- How can dependency injection be helpful in testing?
- What is
IHttpClientFactory
used for and which issues does it help to eliminate? - What is wrong with creating
HttpClient
manually? - What would you choose for implementing communication between microservices: REST or a message broker? What would you consider when making such a choice?
- What would you do as a backend developer when frontend developers are blocked because they are missing an API endpoint from your side?
- What is the size of stack in .NET?
- What are value and reference types? What is the difference between them? Give a practical example
- Which objects go on Large Object Heap?
- What is JIT compilation?
- Describe the strategies for delivering a message in a message queue
- When is
Dispose
method called on a class implementingIDisposable
? - What is the difference between
Dispose
andFinalize
? - What is SOLID? Can you elaborate on each SOLID acronym?
- You are assigned a task to process a large piece of text by inserting and changing many parts of it. Which of the following would you use for that task:
string
,StringBuilder
,StringWriter
orStringReader
? - What’s the difference between Repository and Query Object patterns?
- What is the Saga pattern?
- What is CQRS and in which scenarios may it be beneficial?
- What is the difference between an event and a command (like in CQRS)?
- What are the advantages and disadvantages of using a Repository pattern?
- What is Clean Architecture? Who invented it and how it works?
- What is Onion Architecture?
- What is Modular Monolith?
Experience-related .NET Interview Questions
- Describe how you realized authentication & authorization in your last project
- Explain your last project’s architecture
- Explain a challenging task you faced in your last project and how you solved it
- How would you approach diagnosing a performance issue on production, which cannot be reproduced locally?
- Explain the “event-based architecture” you implemented in your last project. This was something I explicitly mentioned in my resume, so the advice is: prepare to elaborate on every experience you mention in your resume 🙂
- How would you choose tech stack for a new full stack web application (backend + frontend)? Describe your decision-making process: what would you take into consideration when choosing a tech stack?
- How would you decide whether to use an already-existing component (e.g. a library) vs implementing your own?
Final tips
These were not all of the questions I was asked, but the ones that recurred most frequently. As a programmer with almost 10 years of professional experience, I wasn’t asked many basic programming questions. The recruiters were mostly focused on my experience. They wanted to know how I solved problems at work in the past and what’s my approach to tackling issues. Rather than asking me theories about a design pattern, they wanted to know how I applied it in practice and whether I was happy with deciding to use it in the first place.
My general advice is to be patient and iterate. After each technical interview, try to write down as many questions as you can remember. This will help you be better and better prepared with each interview you take. Don’t forget to update your LinkedIn profile and keep building a quality network, even if you’re not on the job lookout right now. It comes in handy!
If you happen to be in a work search right now, I keep my fingers crossed! I hope these .NET interview questions will help you get that dream job 😉
If you’re interested in knowing something about programming job search in current market conditions, feel free to leave a comment 🙂