Information Technology

.NET Developer Interview Questions and Answers

.NET developers build applications using Microsoft's .NET framework, including C#, ASP.NET Core, and Entity Framework. They work on web, desktop, and cloud solutions, leveraging the modern .NET ecosystem.

20 practice questions with explanations and sample answers.

  1. 1. Why do you choose .NET for development?

    What the interviewer is looking for

    Show appreciation for the ecosystem and tooling.

    Sample answer

    .NET offers a unified platform, excellent tooling (Visual Studio), and strong performance. ASP.NET Core is ideal for modern web applications.

  2. 2. Explain the difference between .NET Framework and .NET Core.

    What the interviewer is looking for

    Define cross‑platform and modularity.

    Sample answer

    .NET Core is cross‑platform, open‑source, and modular; .NET Framework is Windows‑only and monolithic.

  3. 3. What is your experience with ASP.NET Core Web API?

    What the interviewer is looking for

    Building RESTful services.

    Sample answer

    I have built RESTful APIs using ASP.NET Core, implementing controllers, routing, and dependency injection.

  4. 4. How do you handle database access in .NET (Entity Framework, Dapper)?

    What the interviewer is looking for

    Use ORM or micro‑ORM.

    Sample answer

    I use Entity Framework Core for complex data models and Dapper for high‑performance queries.

  5. 5. Describe a time you optimised a slow query or API endpoint.

    What the interviewer is looking for

    Show profiling and caching.

    Sample answer

    I added indexes and used caching (MemoryCache) to reduce a frequently called API's response time by 60%.

  6. 6. What is dependency injection and how does .NET Core implement it?

    What the interviewer is looking for

    Built‑in DI container.

    Sample answer

    .NET Core has built‑in DI; I register services in Startup.cs and inject them via constructors.

  7. 7. What is the difference between IActionResult and ActionResult?

    What the interviewer is looking for

    IActionResult is an interface, ActionResult is a base class.

    Sample answer

    IActionResult is an interface that allows returning different response types; ActionResult is an abstract base class.

  8. 8. How do you implement authentication and authorisation in .NET Core?

    What the interviewer is looking for

    Use Identity or JWT.

    Sample answer

    I use ASP.NET Core Identity for user management and JWT Bearer tokens for API authentication.

  9. 9. What is your experience with background tasks (HostedService, Quartz)?

    What the interviewer is looking for

    Schedule and run tasks.

    Sample answer

    I have used IHostedService and Quartz.NET for scheduled jobs in .NET Core applications.

  10. 10. Describe a time you worked with version control and CI/CD.

    What the interviewer is looking for

    Git, Azure DevOps.

    Sample answer

    I use Git for version control and have set up CI/CD pipelines in Azure DevOps for automated builds and deployments.

  11. 11. What is the purpose of the appsettings.json file?

    What the interviewer is looking for

    Configuration management.

    Sample answer

    It stores application configuration, including connection strings, logging levels, and feature flags.

  12. 12. Explain the difference between transient, scoped, and singleton services.

    What the interviewer is looking for

    Define lifetimes.

    Sample answer

    Transient: new instance each time; Scoped: per request; Singleton: one instance for the entire application lifetime.

  13. 13. What is your experience with Azure or AWS for .NET hosting?

    What the interviewer is looking for

    Cloud deployment.

    Sample answer

    I have deployed .NET apps to Azure App Service and used Azure SQL for database hosting.

  14. 14. How do you handle error logging and monitoring in .NET?

    What the interviewer is looking for

    Use Serilog, NLog, or Application Insights.

    Sample answer

    I use Serilog for structured logging and Application Insights for performance monitoring.

  15. 15. Describe a time you refactored a legacy .NET application.

    What the interviewer is looking for

    Show improvement.

    Sample answer

    I refactored a Web Forms app to ASP.NET Core MVC, improving maintainability and performance.

  16. 16. What is the difference between ViewData, ViewBag, and TempData?

    What the interviewer is looking for

    Define usage.

    Sample answer

    ViewData and ViewBag pass data from controllers to views; TempData persists across redirects.

  17. 17. How do you test .NET applications (xUnit, Moq)?

    What the interviewer is looking for

    Unit and integration tests.

    Sample answer

    I write unit tests with xUnit and Moq, and integration tests for API endpoints.

  18. 18. What is your experience with microservices in .NET?

    What the interviewer is looking for

    Design and communication.

    Sample answer

    I have designed microservices using ASP.NET Core, Docker, and Kubernetes, with communication via HTTP/REST and message queues.

  19. 19. What are the advantages of using async/await in .NET?

    What the interviewer is looking for

    Improve scalability and responsiveness.

    Sample answer

    Async/await improves application responsiveness and scalability by freeing threads during I/O operations.

  20. 20. Why do you want to work for our organisation?

    What the interviewer is looking for

    Mention their tech stack or projects.

    Sample answer

    Your organisation is modernising its platform with .NET Core. I want to be part of that migration.

Question lists are a great start — but they can't recreate real interview pressure

Reading through questions is a convenient way to begin preparing, but it comes with a catch: you know what's coming next. In an actual interview, you never do — and that unpredictability is exactly what makes interviews so stressful. Practicing from a list can't train you for the moment a surprise question lands.

Go beyond lists with a realistic interview simulator

AI simulator lets you experience the real thing — unexpected questions, on the spot, from anywhere. Our AI generates a fresh set of questions every single time you practice, so you're always training for the unknown, not memorizing a script.

Upload your Resume and the Job Description, and we'll build a Custom Interview Strategy Guide + tailored Mock Interview Prep for the exact role you're targeting — questions grounded in real-world professional insight, with instant feedback after every answer.

Try a Free AI Mock Interview

Practice as often as you like, walk in confident, and ace the interview.