.NET Developer Interview Questions & Answers
40 questions for .NET Developer interviews — 30 easy, 9 medium, 1 hard.
About the .NET Developer role
A .NET developer builds and maintains back-end services and business applications using C# and ASP.NET Core. Daily work includes writing APIs, business logic and EF Core data access, fixing bugs, writing unit tests and joining code reviews. Freshers usually start on enhancement and support tasks in established projects before owning modules. Strong C#, OOP and SQL fundamentals matter most in interviews for this role.
Explain First, FirstOrDefault, Single and SingleOrDefault.
Show answer
Write a SQL Server query to find the second highest salary.
Show answer
When should you use StringBuilder instead of string?
Show answer
What is the difference between == and Equals() in C#?
Show answer
Explain the ref, out and in parameter modifiers.
Show answer
What is the difference between concurrency and parallelism?
Show answer
You need to remove inactive users from a List<User> while looping through it with foreach, and you get an InvalidOperationException. How do you fix it?
Show answer
What is the difference between a stored procedure and a user-defined function?
Show answer
Explain value types and reference types in C#.
Show answer
Where do you see yourself in five years?
Show answer
What is the difference between JIT compilation and Native AOT in .NET?
Show answer
Tell me about a time you had to learn a new C# or .NET feature quickly.
Show answer
Write a switch expression using pattern matching to calculate shipping cost.
Show answer
What is the difference between a primary key and a unique key in SQL Server?
Show answer
Why do you want to work as a .NET full stack developer?
Show answer
What is the difference between compile-time and runtime polymorphism?
Show answer
What is the difference between a shallow copy and a deep copy?
Show answer
What is the difference between a clustered and a non-clustered index?
Show answer
What is the difference between .NET Framework, .NET Core and modern .NET?
Show answer
Explain the different types of SQL joins.
Show answer
What is LINQ and why is it useful?
Show answer
What is the difference between method overloading and method overriding?
Show answer
What is the difference between a static class and a singleton?
Show answer
What is the difference between DELETE, TRUNCATE and DROP?
Show answer
Show constructor chaining in C#.
Show answer
Sort a list of students by marks descending, then by name ascending.
Show answer
Show the difference between ROW_NUMBER, RANK and DENSE_RANK with a query.
Show answer
What is the difference between var, dynamic and object?
Show answer
What is the difference between an abstract class and an interface in C#?
Show answer
Write a C# method to reverse a string without using Array.Reverse or LINQ.
Show answer
Explain normalisation and the first three normal forms.
Show answer
Show encapsulation using properties, including init-only and validation.
Show answer
When would you choose an array, a List<T> or a LinkedList<T>?
Show answer
What are your strengths and weaknesses as a developer?
Show answer
Why is Any() usually better than Count() > 0?
Show answer
What are partial classes and partial methods?
Show answer
Show how to implement IDisposable and use the using statement.
Show answer
A report builder concatenates 50,000 rows into one string with += and takes several seconds. What do you change?
Show answer
What is SQL injection and how do you prevent it in a .NET application?
Show answer
Frequently asked questions
What does a .NET Developer do?
A .NET developer builds and maintains back-end services and business applications using C# and ASP.NET Core. Daily work includes writing APIs, business logic and EF Core data access, fixing bugs, writing unit tests and joining code reviews. Freshers usually start on enhancement and support tasks in established projects before owning modules. Strong C#, OOP and SQL fundamentals matter most in interviews for this role.
Which skills are tested in a .NET Developer interview?
Expect questions on C# and OOP, LINQ queries, ASP.NET Core basics, SQL queries, Git and unit testing. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a .NET Developer interview?
Revise C# Fundamentals, OOP in C#, LINQ, Collections and Generics, SQL Server and T-SQL first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.