C# / .NET Developer track

C# and .NET interview questions and answers

C# and .NET interviews test value and reference types, LINQ, async code, memory and dependency injection. Then you solve a coding problem. Practice both with follow-ups.

Start a free mock interview

Questions

Interview questions and answers.

Real questions from this track, from easier to harder, with what a good answer covers. In the mock interview, each one comes with follow-ups based on what you say.

  1. Types

    What is the difference between a struct and a class in C#?

    A good answer covers that a struct is a value type, copied when assigned or passed.

  2. LINQ

    What is LINQ?

    A good answer covers that LINQ lets you filter, sort and project collections with methods like Where and Select.

  3. OOP

    What is an interface in C#, and why use one?

    A good answer covers that an interface lists members a class promises to provide.

  4. Errors

    How should you handle exceptions in C#?

    A good answer covers that you catch specific exceptions you can handle, and let others go up.

  5. Resources

    What are IDisposable and the using statement for?

    A good answer covers that IDisposable is for objects holding resources like files, connections or handles.

  6. Generics

    What are generics in C#?

    A good answer covers that generics let a class or method work with any type while keeping type safety.

  7. Types

    What do nullable reference types do?

    A good answer covers that with them turned on, string means never null and string? means may be null.

  8. OOP

    What are properties in C#?

    A good answer covers that a property looks like a field but runs get and set code.

  9. Async

    How do async and await work in C#?

    A good answer covers that await frees the thread while waiting for I/O, then continues later.

  10. ASP.NET Core

    What are the service lifetimes in ASP.NET Core dependency injection?

    A good answer covers that transient creates a new instance each time, scoped once per request, singleton once for the app.

  11. Entity Framework

    How does Entity Framework Core turn your code into database queries?

    A good answer covers that LINQ on a DbSet is translated into SQL when the query runs.

  12. Collections

    How do you choose between List, Dictionary, HashSet and the immutable collections?

    A good answer covers that List keeps order, Dictionary looks up by key and HashSet holds unique items.

  13. Language

    What are delegates and events in C#?

    A good answer covers that a delegate is a typed reference to a method, like Func and Action.

  14. Async

    Why can calling .Result or .Wait() on a task cause problems?

    A good answer covers that it blocks a thread while waiting, which wastes threads under load.

  15. Types

    What are records in C#?

    A good answer covers that records compare by value, not by reference.

  16. ASP.NET Core

    How does the ASP.NET Core request pipeline work?

    A good answer covers that each middleware handles a request and calls the next one.

  17. Runtime

    How does the .NET garbage collector work?

    A good answer covers that objects start in generation 0, and survivors move to older generations.

  18. Performance

    What are Span<T> and Memory<T> for?

    A good answer covers that Span is a view over memory that avoids copying arrays and strings.

  19. Concurrency

    How do you share data safely between threads in .NET?

    A good answer covers that lock protects shared state so one thread changes it at a time.

  20. Testing

    How do you test an ASP.NET Core service?

    A good answer covers that unit tests with xUnit cover logic, with fakes for dependencies.

  21. Entity Framework

    How do you avoid slow queries with Entity Framework Core?

    A good answer covers that lazy loading can cause one query per row, the N+1 problem.

  22. Async

    How does cancellation work in .NET async code?

    A good answer covers that a CancellationToken is passed down so work can stop when asked.

  23. ASP.NET Core

    How do you handle configuration in ASP.NET Core?

    A good answer covers that settings come from layers like appsettings, environment variables and secrets stores.

  24. Architecture

    How would you structure a large .NET solution for several teams?

    A good answer covers that projects are split by domain with clear public contracts.

  25. Performance

    A .NET API gets slow under load. How do you find the cause?

    A good answer covers that thread pool starvation from blocking calls is a common cause.

  26. ASP.NET Core

    How would you run background work in an ASP.NET Core app?

    A good answer covers that a hosted service runs work alongside the web app with its own scope.

  27. Runtime

    How would you move a large .NET Framework app to modern .NET?

    A good answer covers that you first check which libraries and APIs are not supported.

  28. Architecture

    How do you make calls from a .NET service to other services reliable?

    A good answer covers that HttpClient comes from IHttpClientFactory so connections are reused.

  29. Architecture

    How would you run .NET well across many teams and services?

    A good answer covers that a template gives logging, health checks, telemetry and security from the start.

  30. Runtime

    When would you use Native AOT for a .NET service?

    A good answer covers that Native AOT starts fast and uses less memory, which suits functions and small containers.

  31. Architecture

    How would you set data access standards for a large .NET organization?

    A good answer covers that EF Core is the default for most work, with clear rules for queries and migrations.

  32. Architecture

    What would you put in place to run .NET services well in production?

    A good answer covers that OpenTelemetry sends traces, metrics and logs from every service.

What it covers

Topics.

  • ASP.NET Core
  • Async
  • Architecture
  • Types
  • Entity Framework
  • Runtime
  • OOP
  • Resources
  • Language
  • Performance
  • Concurrency
  • LINQ

How it works

How the mock interview runs.

  1. Concept questions that start simple and get harder.

  2. Follow-ups on every answer, so you explain the why.

  3. One coding challenge in a live editor.

Your report scores technical correctness, problem-solving & tradeoffs, communication clarity, with quotes from your answers as proof.

Questions.

What C# questions come up most?

Expect value and reference types, and async and await. LINQ comes up a lot. You may also get IDisposable, garbage collection and dependency injection.

How does an Orin mock interview work?

You talk with Orin by voice, like a video call. It asks questions, listens and asks follow-ups based on what you said. Coding happens in a live editor and design on a live whiteboard. After the interview you get a report with quotes from your answers, what cost you points and what to practice next.

Is it free?

Your first interview is free: a 15-minute round with a short coding exercise. No card needed.

Practice the real thing.

A c# / .net developer mock interview by voice, with follow-ups and feedback you can use. First interview free.

Start free interview