.NET Interview Questions to Ask Before You Hire

Modern .NET is a different platform from the legacy .NET Framework many resumes were built on, and the interview needs to establish which one your candidate actually knows. These questions probe async discipline, EF Core judgment, and ASP.NET Core architecture, with notes on what strong answers cover.

4.9/5from US hiring teams
βœ“$0 until you hireβœ“Top 2% of US talentβœ“48h average time to hireβœ“No recruitment fees

12 .NET interview questions β€” with what to listen for

  1. 1

    Explain async/await in .NET β€” what actually happens at an await, and what are the classic ways teams deadlock or lose performance?

    What a strong answer covers

    The method yields and resumes via a state machine rather than blocking a thread. Classic sins: sync-over-async with .Result or .Wait() causing deadlocks and thread starvation, async void outside event handlers, and forgetting cancellation tokens. ConfigureAwait nuance in library versus app code is a bonus.

  2. 2

    Walk me through the dependency injection lifetimes in ASP.NET Core and a bug you have seen from getting them wrong.

    What a strong answer covers

    Singleton, scoped, transient, and the classic failure: a scoped DbContext captured by a singleton, or transient services holding expensive resources. The war story matters β€” lifetime bugs are subtle and everyone with real mileage has one.

  3. 3

    How does Entity Framework Core track changes, and when do you turn tracking off?

    What a strong answer covers

    The change tracker snapshots entities for update detection; AsNoTracking for read-only queries to cut memory and CPU. Strong candidates extend to projection with Select to avoid loading full entities and know SaveChanges batching behavior.

  4. 4

    An EF Core query is slow in production. What is your diagnostic path?

    What a strong answer covers

    Log the generated SQL, examine the query plan, check for N+1 lazy loading, client-side evaluation, missing indexes, and cartesian explosion from multiple Includes with AsSplitQuery as a fix. Falling back to raw SQL or a stored procedure for hot paths, measured, is a legitimate ending.

  5. 5

    Middleware in ASP.NET Core: how does the pipeline work, and what have you built as custom middleware?

    What a strong answer covers

    An ordered chain of delegates each choosing to short-circuit or call next; order matters (exception handling early, auth before endpoints). Real examples: correlation IDs, tenant resolution, request logging, rate limiting. Knowing built-ins before reinventing them is the judgment test.

  6. 6

    Where do value types versus reference types actually matter in day-to-day .NET performance work?

    What a strong answer covers

    Allocation pressure and GC cost: structs for small, short-lived data, boxing traps in old collections and interfaces, Span<T> and Memory<T> for allocation-free slicing in hot paths. The senior version cites measuring with profilers or BenchmarkDotNet before optimizing.

  7. 7

    How do you handle configuration and secrets across environments in ASP.NET Core?

    What a strong answer covers

    The layered configuration system β€” appsettings, environment variables, user secrets in development, a vault service in production β€” with the options pattern and validation on startup. Connection strings in source control is the disqualifying pattern.

  8. 8

    Explain how you would structure a new ASP.NET Core solution for a product with a web API, background jobs, and shared domain logic.

    What a strong answer covers

    Separation of domain from infrastructure, some flavor of clean or vertical-slice architecture held pragmatically, hosted services or a job runner for background work, and shared kernel libraries. Dogmatic layer proliferation for a small product is itself a yellow flag; listen for proportion.

  9. 9

    What is your approach to unit and integration testing in .NET?

    What a strong answer covers

    xUnit or NUnit with mocking where it earns its keep, WebApplicationFactory for in-memory integration tests of the real pipeline, and Testcontainers or a real database for data-layer tests rather than trusting the EF in-memory provider. Distrust of the in-memory provider is a known-good signal.

  10. 10

    A legacy .NET Framework 4.8 application needs a path to modern .NET. How do you plan it?

    What a strong answer covers

    Audit dependencies with upgrade tooling, target .NET Standard for shared libraries, strangle incrementally β€” new services on modern .NET, API surface carved out β€” versus in-place upgrade depending on coupling. Windows-only dependencies like WCF and System.Web need named replacement strategies.

  11. 11

    How does garbage collection work in .NET at the level a working developer needs, and when have you had to care?

    What a strong answer covers

    Generational collection, the large object heap, server versus workstation GC modes. Caring moments: memory leaks from event handler references or static caches, LOH fragmentation, pause-sensitive workloads. Tooling fluency β€” dotnet-counters, dumps, PerfView β€” beats theory recital.

  12. 12

    When would you pick minimal APIs versus controllers, and gRPC versus REST, in a new .NET service?

    What a strong answer covers

    Minimal APIs for small focused services, controllers for larger surfaces wanting filters and conventions β€” with the gap narrowing every release. gRPC for internal service-to-service contracts and streaming, REST for public and browser-facing APIs. Reasoned defaults, not fashion.

Skip the interviews entirely β€” get matched with pre-vetted .NET developers in 48 hours, $0 until you hire.

Need a custom question set?

Our free interview question generator builds a tailored list for any role, seniority, and focus area.

Try the interview question generator β†’

Frequently asked questions

How do I tell modern .NET experience from legacy .NET Framework experience?

Ask the migration and minimal-API questions and listen for tense: candidates current on modern .NET talk about minimal APIs, built-in DI, and cross-platform deployment as daily reality. Framework-era candidates center IIS, Web Forms or MVC 5, and Windows-only patterns.

Are these questions appropriate for a C# developer going into Unity work?

Only partially. The language, async, and memory questions transfer; the ASP.NET Core and EF questions do not. For game work, use our Unity question set instead β€” the runtime, frame-budget, and asset questions matter far more there.

What practical task fits a .NET hire best?

A code review of a small ASP.NET Core service with planted issues: a sync-over-async call, a scoped service injected into a singleton, an untracked N+1 query. Review exercises test exactly the judgment these questions probe, in less time than a build-from-scratch task.

Ready to hire?

Vetted talent ready for US teams. No recruitment fees. Zero risk.

πŸ‡ΊπŸ‡Έ Trusted by companies across the United States