What should I focus on for a C# and .NET interview?
Which topics should I start with?
Start with async and threading, which appeared in 31 of 95 interviews. Dependency injection, design patterns, and testing appeared in 30 of 95 interviews. These were the most common topic groups in these interviews.
The service lifetime question was the most asked individual question, appearing in 13 of 95 interviews. Check whether you can answer it and the other common questions:
- How do transient, scoped, and singleton lifetimes differ? When would you use each?
- What is dependency injection in .NET, and why is it used?
- How do
asyncandawaitwork, and when should you use them?
What should I know beyond definitions?
The async questions go beyond async and await. Can you explain cancellation and exception handling? Can you describe synchronization, deadlocks, and how to limit concurrent work?
For language and runtime questions, check whether you can explain these differences and responsibilities:
- How do value types and reference types differ?
- What does the CLR manage when .NET code runs?
- How does modern .NET differ from .NET Framework?
- What does
ConfigureAwaitdo, and when should you useConfigureAwait(false)?
Memory questions cover stack and heap storage, boxing, garbage collection, disposal, and finalizers. Can you explain what garbage collection does and how disposal differs from it?
What should I check for web and data questions?
Start with the request pipeline. Can you walk through an HTTP request as it passes through ASP.NET Core? Explain what middleware does, then check how routing, model binding, validation, and error handling fit into request handling.
For data access, can you compare IEnumerable with IQueryable? Can you explain deferred execution in LINQ? The data questions also cover Entity Framework behavior, database access, and serialization formats.
For security, can you explain the difference between authentication and authorization? Can you describe what JWT validation involves? These are concrete checks before moving to questions on claims, cookies, and secure configuration.
Should I be ready to write code?
Code-writing tasks appeared in 8 of 95 interviews. Try these tasks from the interviews without looking up the syntax:
- Write an interface and a class that implements it.
- Write the line that registers a transient service in ASP.NET Core.
- Use LINQ to find users whose names start with uppercase N. Explain why some expressions might not translate to SQL.
- Create and start a thread in C#.
- Write route attributes for a controller action that updates a user by ID.
Who gets asked C# and .NET
The 20 most asked C# and .NET questions
Counted by interview, not by mention: a question asked twice in one conversation counts once.
How do transient, scoped, and singleton service lifetimes differ, and when would you use each?
Asked in 13 of 95 interviews · last asked Sep 29 · Concept · Mid-level
Show answer
Transient creates a new instance each time it is requested; use it for a small, stateless formatter. Scoped creates one instance per scope, usually one HTTP request; use it for an EF Core DbContext. Singleton shares one instance across the application; use it for a thread-safe in-memory cache. Singletons must not capture scoped services.
- Scoped services are shared within a scope, but separate scopes get separate instances.
- Singleton services must handle concurrent access safely.
- Injecting DbContext into a singleton can fail scope validation or cause unsafe sharing between requests.
- Background services must create an explicit scope when they need scoped services.
What the interviewer checks: The interviewer checks whether you can choose lifetimes based on shared state, thread safety, and dependency lifetimes.
Other ways it was asked
- “Can you explain the differences between transient, scoped, and singleton service lifetimes in ASP.NET Core, and give a concrete example of when you would use each?”
- “In ASP.NET Core, what's the difference between transient, scoped, and singleton lifetimes?”
- “Explain transient, scoped, and singleton lifetimes in ASP.NET Core.”
How do async and await work in C#, and when should you use them?
Asked in 11 of 95 interviews · last asked Oct 5 · Concept · Mid-level
Show answer
async lets a method use await; the compiler turns its body into a state machine. When an awaited operation is incomplete, await pauses the method without blocking the thread and resumes it later. Use this for I/O, such as HTTP or database calls, to keep apps responsive and avoid blocking server threads.
- The method runs synchronously until it reaches an await whose operation is incomplete.
- Async methods usually return Task or Task<T>. Avoid async void except for event handlers.
- async does not create a thread. For CPU-heavy work, Task.Run can keep a UI responsive.
- await rethrows task exceptions. Blocking with .Result or .Wait() can cause deadlocks.
What the interviewer checks: The interviewer checks whether you understand nonblocking execution, task handling, and when asynchronous code is useful.
Other ways it was asked
- “What are async and await in C#, and how do they support asynchronous programming?”
- “What are async and await in C#, and why are they important?”
- “How do async and await work in C#, and when would you use them?”
What is dependency injection in .NET, and why is it used?
Asked in 9 of 95 interviews · last asked Oct 15 · Concept · Junior
Show answer
Dependency injection means a class receives the objects it needs instead of creating them itself. In .NET, you register services with a DI container, which creates objects and supplies their dependencies, usually through constructors. This reduces tight coupling and makes code easier to test and change.
- Modern .NET includes a built-in DI container; Autofac is another option.
- Code can depend on interfaces, making implementations easier to replace.
- Service lifetimes control reuse: transient per resolution, scoped per scope, and singleton per container.
- In ASP.NET Core, a scope normally lasts for one web request.
What the interviewer checks: The interviewer checks whether you understand how DI separates object creation from use and supports testing and maintenance.
Other ways it was asked
- “What is dependency injection, and what are some DI containers used in .NET?”
- “How does dependency injection work in .NET?”
- “In your own words, what is dependency injection in .NET?”
What is middleware in ASP.NET Core?
Asked in 8 of 95 interviews · last asked Oct 1 · Concept · Junior
Show answer
Middleware is a component in the ASP.NET Core HTTP request pipeline. It can process a request, call the next component, and process the response as control returns. It can also stop the pipeline and return a response itself. Common uses include logging, authentication, and error handling.
- Middleware runs in registration order for requests and reverse order as control returns.
- Calling the next component continues the pipeline; not calling it stops further processing.
- Order matters: authentication should run before authorization.
- Error-handling middleware can catch exceptions from components registered after it.
What the interviewer checks: The interviewer checks whether you understand pipeline flow, middleware order, and common uses.
Other ways it was asked
- “What is .NET Core middleware?”
- “What is middleware in ASP.NET?”
- “Can you explain what middleware is in ASP.NET Core and how it contributes to processing an incoming HTTP request?”
What is .NET, and how does modern .NET differ from .NET Framework?
Asked in 6 of 95 interviews · last asked Sep 19 · Concept · Junior
Show answer
.NET is a development platform with a runtime, libraries, and tools for building and running applications in languages such as C#. Modern .NET grew from .NET Core and supports Windows, Linux, and macOS. .NET Framework is the older, Windows-only implementation, mainly maintained for existing applications.
- The runtime executes managed code and handles tasks such as memory management through garbage collection.
- Modern .NET receives new features; .NET Framework continues to receive support and security fixes.
- Modern .NET is cross-platform, but some application types, such as WPF and Windows Forms, remain Windows-only.
- Moving from .NET Framework may require code changes because not all APIs and libraries are compatible.
What the interviewer checks: The interviewer wants to know whether you understand the platform and can distinguish its modern and older implementations.
Other ways it was asked
- “What is .NET?”
- “What is Microsoft .NET?”
- “Can you explain what .NET is?”
What is the difference between IEnumerable and IQueryable in .NET?
Asked in 6 of 95 interviews · last asked Oct 2 · Concept · Mid-level
Show answer
IEnumerable<T> supports iteration, and its LINQ operators run .NET code on the items. IQueryable<T> also supports iteration, but builds expression trees that a query provider interprets. In Entity Framework, this lets supported operations run as SQL in the database. Use IQueryable<T> to build database queries and IEnumerable<T> to work with items in .NET.
- IQueryable<T> inherits from IEnumerable<T>; the provider decides how the query runs.
- Both can use deferred execution; IEnumerable<T> does not mean the data is already loaded.
- AsEnumerable() makes later LINQ operators run in .NET; it does not immediately load the results.
- Filtering in the database can reduce transferred data, but not every .NET operation can become SQL.
What the interviewer checks: The interviewer checks whether you understand where queries run, when they execute, and how that affects performance.
Other ways it was asked
- “What is the difference between IQueryable and IEnumerable?”
- “In the .NET framework, what’s the difference between IEnumerable and IQueryable, and when would you choose one over the other?”
- “What's the difference between IEnumerable and IQueryable?”
What is the difference between value types and reference types in C#?
Asked in 4 of 95 interviews · last asked Sep 21 · Concept · Junior
Show answer
A value-type variable holds the value itself; a reference-type variable holds a reference to an object. Assignment copies the value for value types and the reference for reference types. Two reference-type variables can point to the same object, so changes to that object's data can be seen through both.
- Structs and enums are value types; classes, arrays, and strings are reference types.
- Value types are not always on the stack; storage depends on where they are used.
- Copying a struct copies its fields, but reference-type fields still point to the same objects.
- Reference types can hold null; value types need Nullable<T> to represent null.
What the interviewer checks: The interviewer is checking whether you understand copying, shared objects, and why stack versus heap is not the main distinction.
Other ways it was asked
- “Do you know the difference between reference types and value types?”
- “Tell me a bit about the differences between value types and reference types.”
- “What is the difference between reference types and value types?”
What does ConfigureAwait do, and when should you use ConfigureAwait(false)?
Asked in 4 of 95 interviews · last asked Sep 29 · Concept · Senior
Show answer
ConfigureAwait controls whether an await tries to resume on the captured context. ConfigureAwait(false) skips that capture; it does not force a new thread. Use it in library code that does not need the caller’s context. Avoid it when later code needs the UI context or ASP.NET Framework request context.
- By default, task awaits capture a SynchronizationContext or, without one, a non-default TaskScheduler.
- ASP.NET Core normally has no custom SynchronizationContext, so ConfigureAwait(false) usually makes no scheduling difference.
- It affects only that await, not every await in the method.
- It can prevent some blocking deadlocks, but awaiting instead of using .Result or .Wait() is safer.
What the interviewer checks: The interviewer checks whether you understand continuation scheduling and when code depends on its original context.
Other ways it was asked
- “What does ConfigureAwait do, and when might you use ConfigureAwait(false)?”
- “What is ConfigureAwait(false) and when would you use it?”
- “Do you need to use ConfigureAwait(false) in C# async methods, and when?”
What happens as an HTTP request passes through the ASP.NET Core request pipeline?
Asked in 4 of 95 interviews · last asked Sep 18 · Concept · Mid-level
Show answer
An HTTP request passes through an ordered chain of middleware in ASP.NET Core. Each middleware can handle the request, call the next component, or stop the chain early. Routing selects an endpoint, such as an MVC action, which runs if the request reaches endpoint execution. Afterward, control returns through earlier middleware in reverse order to finish the response.
- Middleware runs in registration order for requests; code after calling the next component runs in reverse order.
- Middleware can stop the chain early, for example by serving a static file or rejecting access.
- Routing selects an endpoint; authentication identifies the user, and authorization checks access before the endpoint runs.
- For MVC endpoints, model binding, validation, filters, action execution, and result execution happen within the pipeline.
What the interviewer checks: The interviewer checks whether you understand middleware order, early responses, and how routing and MVC fit into request handling.
Other ways it was asked
- “What is the ASP.NET request pipeline, why is it used, and how does it work?”
- “What is the ASP.NET Core request pipeline, and how does it work?”
- “How does the middleware request pipeline work in ASP.NET Core?”
What does the CLR manage, and what role does it play when .NET code runs?
Asked in 3 of 95 interviews · last asked Aug 27 · Concept · Junior
Show answer
The Common Language Runtime (CLR) runs managed .NET code and manages memory, garbage collection, type safety, and exception handling. It loads code and usually uses just-in-time (JIT) compilation to turn intermediate language (IL) into machine code. Managed code means code that runs under the runtime's control.
- Garbage collection reclaims memory from managed objects that are no longer reachable.
- The CLR loads assemblies and provides runtime services across .NET languages.
- JIT compilation happens at runtime; ahead-of-time compilation can produce machine code before execution.
- Garbage collection does not replace disposing resources such as files and database connections.
What the interviewer checks: The interviewer is checking whether you understand how .NET code executes and which services the runtime provides.
Other ways it was asked
- “Can you explain what the CLR does and why it is important when a .NET application runs?”
- “What is the CLR, and what role does it play when a .NET application runs?”
- “What is the Common Language Runtime (CLR), and what happens when a .NET application runs?”
What is .NET Core?
Asked in 3 of 95 interviews · last asked Oct 15 · Concept · Junior
Show answer
.NET Core is a free, open-source platform for building and running applications on Windows, Linux, and macOS. Unlike .NET Framework, which runs only on Windows, it supports cross-platform development. It also supports side-by-side runtime versions. From .NET 5 onward, its successor is called .NET.
- .NET Core includes a runtime and libraries; its SDK provides tools to build applications.
- It is commonly used for web apps, APIs, services, and console apps.
- Windows Forms and WPF remain Windows-only, even on modern .NET.
- For new development, use a supported modern .NET version rather than the old .NET Core releases.
What the interviewer checks: The interviewer is checking whether you understand the platform, its Windows-only predecessor, and its modern name.
Other ways it was asked
- “What is the difference between .NET Framework and .NET Core?”
What does the `virtual` keyword do in C#, and when would you use it?
Asked in 3 of 95 interviews · last asked Aug 19 · Concept · Junior
Show answer
In C#, `virtual` lets a derived class replace an inherited member's implementation using `override`. When you call a virtual method, the object's runtime type determines which implementation runs. Use it when a base class provides default behavior that derived classes may need to change.
- Methods, properties, indexers, and events can be virtual.
- Overriding is optional; the inherited implementation runs if no override replaces it.
- Class methods are non-virtual by default. Use `override`, not `new`, to change virtual behavior.
What the interviewer checks: The interviewer is checking whether you understand overriding and how virtual calls support polymorphism.
Other ways it was asked
- “What is the virtual keyword used for in C#?”
- “What is the virtual keyword, and why do we use it?”
What are boxing and unboxing in C#, and what happens when a value type becomes an object?
Asked in 3 of 95 interviews · last asked Sep 21 · Concept · Junior
Show answer
Boxing wraps a copy of a value type in an object on the managed heap. This happens, for example, when an int is passed to a method that accepts object. Unboxing checks the boxed value’s type and copies its value back into a value type through an explicit cast.
- Changing the original value does not change the boxed copy.
- Unboxing requires the matching value type; a boxed int cannot be directly unboxed as long.
- Boxing adds allocation and garbage collection costs; generic collections can avoid it.
Codeint number = 5; object boxed = number; // Boxing: stores a copy of 5. number = 9; // The boxed value stays 5. int restored = (int)boxed; // Unboxing: restored is 5.What the interviewer checks: The interviewer checks whether you understand copying, heap allocation, casting rules, and boxing costs.
Other ways it was asked
- “What are boxing and unboxing in C#?”
- “What happens when an integer value is passed to a C# method that accepts an object?”
- “Where is the object allocated when a C# value type is passed as an object?”
What is a captive dependency, and what happens when a singleton depends on a scoped service?
Asked in 3 of 95 interviews · last asked Sep 29 · Concept · Mid-level
Show answer
A captive dependency happens when a longer-lived service holds a shorter-lived service beyond its intended lifetime. In .NET’s built-in container, injecting a scoped service into a singleton fails when scope validation is enabled. Without validation, the scoped instance effectively lives as long as the singleton. This can cause shared state, unsafe concurrent access, and delayed disposal.
- Scoped services normally belong to one scope, such as an HTTP request.
- Prefer changing service lifetimes so the singleton does not depend on a scoped service.
- If needed, inject IServiceScopeFactory, create a scope per operation, resolve the service there, and dispose the scope.
- Do not keep the scoped service after its scope ends.
What the interviewer checks: The interviewer checks whether you understand service lifetimes, scope validation, and safe scoped-service use from singletons.
Other ways it was asked
- “What is a captive dependency in .NET dependency injection, and why can it cause problems?”
- “What is a captive dependency in dependency injection?”
- “What happens if a scoped service is injected into a singleton in ASP.NET Core?”
How do tasks and threads differ in .NET, and when would you choose each?
Asked in 3 of 95 interviews · last asked Oct 5 · Concept · Mid-level
Show answer
A Task represents an operation and its completion; a Thread is an execution resource. A task does not need its own thread, especially during asynchronous I/O. Choose tasks for most concurrent work because they support await, results, and error handling. Choose a Thread when you need a dedicated thread or control over its priority or apartment state.
- Task.Run normally runs CPU work on a thread pool thread.
- Use asynchronous I/O APIs directly; wrapping them in Task.Run is usually unnecessary.
- A task may complete without ever running on a separate thread.
- Dedicated threads require more manual management and consume resources even when blocked.
What the interviewer checks: The interviewer checks whether you distinguish operations from execution resources and choose the right tool for the work.
Other ways it was asked
- “What is the difference between a Task and a Thread in .NET?”
- “What is the difference between a thread and a task in .NET?”
- “Can you use a thread instead of a task in C#, and why or why not?”
What is Task.Run and how is it different from async/await?
Asked in 3 of 95 interviews · last asked Oct 1 · Concept · Mid-level
Show answer
Task.Run queues work on the thread pool and returns a Task. async and await let a method wait for a task without blocking the calling thread; they do not automatically move work to another thread. Use Task.Run for CPU-heavy work to keep a UI responsive. For network calls, await the asynchronous API directly.
- Synchronous execution keeps the calling thread busy or blocked until the operation finishes.
- Task.Run moves work to a thread-pool thread; it does not make that work inherently faster.
- True asynchronous I/O does not need a thread blocked while waiting for the operation.
- Wrapping synchronous I/O in Task.Run still blocks a thread-pool thread.
What the interviewer checks: The interviewer checks whether you can separate thread-pool execution from asynchronous waiting and choose correctly for CPU or I/O work.
Other ways it was asked
- “When would you use Task.Run, and when would you use async and await directly? What is the key difference, particularly for an I/O-bound operation such as a network call?”
- “What is the difference between Task.Run and standard synchronous execution in .NET?”
What happens behind the scenes when you await an operation in C#?
Asked in 3 of 95 interviews · last asked Sep 1 · Concept · Senior
Show answer
The compiler turns an async method into a state machine. At each await, it checks whether the operation is complete. If not, it saves the method's state, registers a continuation, and returns control to the caller without blocking the thread. When the operation completes, the method resumes and gets the result or throws the exception.
- An already completed operation continues synchronously, without suspending the method.
- Await does not create a thread or automatically move work to another thread.
- Await normally captures a synchronization context when present; ASP.NET Core has none by default.
- Async I/O frees threads while waiting, helping servers handle more concurrent requests.
What the interviewer checks: The interviewer checks whether you understand suspension, continuations, and why asynchronous waiting does not require a blocked thread.
Other ways it was asked
- “What happens internally when you use `await` in C#, and why is it useful?”
- “What happens behind the scenes when you use async and await in ASP.NET Core?”
- “What happens under the hood when you write `await` in C#?”
What are action filters in ASP.NET Core, and when would you use them?
Asked in 3 of 95 interviews · last asked Oct 9 · Concept · Mid-level
Show answer
Action filters in ASP.NET Core MVC run code before and after a controller action executes. Use them for shared logic, such as logging action inputs or checking arguments, on selected actions, controllers, or globally. Use an exception filter instead to handle unhandled exceptions from controller creation, model binding, action filters, or actions.
- Action filters run after model binding, so they can inspect bound action arguments.
- They can skip the action by setting a result before it runs.
- Use authorization policies for access control, rather than action filters.
- Exception filters do not catch exceptions from middleware or MVC result execution.
What the interviewer checks: The interviewer checks whether you can choose the right filter and explain its scope and execution timing.
Other ways it was asked
- “What .NET feature, such as an action filter, can apply request filtering at the method or controller level?”
- “What is a filter in ASP.NET Core MVC, and can you give a concrete example of when you would use an action filter versus an exception filter?”
Can you explain the difference between authentication and authorization in ASP.NET Core, and how JWT tokens fit into this picture?
Asked in 3 of 95 interviews · last asked Aug 15 · Concept · Mid-level
Show answer
Authentication checks who the caller is. Authorization checks what that caller may access. With JWT bearer authentication, the client sends a token in the Authorization header using the Bearer scheme. ASP.NET Core's JWT bearer handler validates the token and creates a claims-based identity; authorization then checks that identity against the endpoint's access rules.
- Token validation checks the signature, issuer, audience, and expiration against configured requirements.
- Authorization can require an authenticated user, specific roles, or policies based on claims.
- Authentication middleware must run before authorization middleware.
- Protected endpoints normally return 401 for missing or invalid authentication, and 403 when an authenticated caller lacks permission.
What the interviewer checks: The interviewer checks whether you understand token validation, identity creation, and permission checks as separate steps.
Other ways it was asked
- “How does JWT Bearer Token authentication work in ASP.NET Core? What happens when a request arrives with a JWT in the authorization header?”
- “What is the difference between authentication and authorization in the context of an ASP.NET Core Web API?”
How can multiple programming languages run on the same .NET platform despite having different syntax?
Asked in 2 of 95 interviews · last asked Aug 27 · Concept · Junior
Show answer
Each .NET language has a compiler that turns its source code into Common Intermediate Language (CIL) and metadata. The Common Language Runtime (CLR) runs this shared format, usually compiling CIL into machine code with a JIT compiler. Shared type rules let code written in different languages work together.
- Language compilers handle syntax differences before the code reaches the runtime.
- The Common Type System (CTS) defines shared types and their rules.
- The Common Language Specification (CLS) defines rules for APIs that work across .NET languages.
What the interviewer checks: The interviewer checks whether you understand how compilers, CIL, and the CLR support different .NET languages.
Other ways it was asked
- “How can different programming languages run on .NET even though they have different syntax?”
.NET fundamentals and runtime interview questions
Explore questions about the .NET platform, CLR, compilation, framework versions, libraries, tools, package management, and deployment options. 17 questions.
What is the difference between an LTS release and a current release of .NET, and how should that distinction affect a team’s maintenance planning for a production application?
Asked in 2 of 95 interviews · last asked Aug 27 · Scenario · Mid-level
Other ways it was asked
- “What is the difference between an LTS and a current release of .NET, and why does that distinction matter for teams managing production applications?”
How do self-contained and framework-dependent .NET deployments differ, and when would you use each?
Asked in 2 of 95 interviews · last asked Aug 27 · Scenario · Mid-level
Other ways it was asked
- “If you needed to deploy a .NET application to a server where the .NET runtime is not installed and cannot be installed, what deployment approach would you use, and why?”
- “What are the trade-offs of self-contained deployment compared with framework-dependent deployment, particularly regarding application size and security patching?”
- “What is the difference between a self-contained and a framework-dependent .NET deployment?”
What is the base class library in .NET, and what kinds of functionality does it provide to developers?
Asked in 2 of 95 interviews · last asked Aug 27 · Concept · Junior
Other ways it was asked
- “What is the .NET Base Class Library, and what kinds of functionality does it provide to developers?”
What is NuGet, and what problem does it solve for .NET developers?
Asked in 2 of 95 interviews · last asked Aug 27 · Concept · Junior
What are binding redirects in .NET Framework, and when are they needed?
Asked once · last asked Oct 2 · Concept · Mid-level
Other ways it was asked
- “What are pending binding redirects in .NET Framework, and when are they needed?”
What is MSIL, and how does the JIT compiler transform it into something the machine can actually run?
Asked once · last asked Aug 6 · Concept · Mid-level
What does it mean in practical terms that .NET is cross-platform? Which operating systems does it support, and how does that work?
Asked once · last asked Aug 27 · Concept · Junior
What is the .NET CLI, and what can you do with it in a .NET project?
Asked once · last asked Aug 27 · Tooling · Junior
What is the difference between .NET Framework, .NET Standard, and .NET Core, and how would you choose one for a new service or library?
Asked once · last asked Sep 28 · Concept · Mid-level
Why might an organization migrate from .NET Framework to .NET 10, and what are the main differences between them?
Asked once · last asked Oct 23 · Concept · Senior
Could you tell me a little bit about the basic components of .NET?
Asked once · last asked May 7 · Concept · Junior
What recent features in .NET do you know, and how do you think the platform is evolving?
Asked once · last asked Oct 2 · Concept · Mid-level
Show 1 more
What is the benefit of upgrading .NET?
Asked once · last asked Oct 9 · Concept · Mid-level
C# language and OOP interview questions
These questions cover C# types, parameter passing, classes, interfaces, inheritance, generics, collections, equality, delegates, exceptions, and reflection. 58 questions.
What is the difference between ref and out keywords in C#?
Asked in 2 of 95 interviews · last asked Oct 1 · Concept · Junior
Other ways it was asked
- “What is the difference between ref, out, and in parameters in C#?”
What are generics in C#, and when would you use them?
Asked in 2 of 95 interviews · last asked Sep 4 · Concept · Junior
Other ways it was asked
- “Why were generics created in C#?”
What is the difference between a class and a struct in C#?
Asked in 2 of 95 interviews · last asked Sep 10 · Concept · Mid-level
Other ways it was asked
- “What is the difference between a struct and a class in C#?”
What is the difference between method overloading and method overriding in C#?
Asked once · last asked Apr 20 · Concept · Junior
Can you explain what custom attributes are in the context of reflection and how you would retrieve them from a class or member at runtime?
Asked once · last asked Jun 13 · Concept · Mid-level
Other ways it was asked
- “How would you retrieve custom attributes at runtime using reflection? What method or approach would you use?”
In C#, how do default equality and ordering comparisons work, and when would you customize CompareTo or GetHashCode?
Asked once · last asked Jan 28 · Concept · Mid-level
Other ways it was asked
- “In C#, how does default comparison work, and when should you override CompareTo or GetHashCode?”
When would you override GetHashCode in C#?
Asked once · last asked Jan 28 · Scenario · Mid-level
In C#, if two separate instances of a class have identical property values, will GetHashCode return the same or different values by default?
Asked once · last asked Jan 28 · Concept · Mid-level
If two separate instances of a C# class have identical property values and are used as dictionary keys, will the dictionary store one entry or two?
Asked once · last asked Jan 28 · Concept · Mid-level
Other ways it was asked
- “If two separate instances of a C# class have identical property values, will a dictionary store one entry or two?”
If two separate instances of a C# class have identical property values, will a HashSet store one item or two?
Asked once · last asked Jan 28 · Concept · Mid-level
How can you use one method for multiple value types in C# while avoiding boxing, rather than writing a separate method for each type?
Asked once · last asked Jan 28 · Concept · Senior
When would you choose a record, class, or struct for a domain type, and why?
Asked once · last asked Mar 16 · Concept · Mid-level
C# memory management and garbage collection interview questions
Memory questions cover stack and heap storage, object layout, boxing, strings, garbage collection, disposal, finalizers, and memory profiling. 24 questions.
How much memory does a string occupy in C#?
Asked once · last asked Sep 10 · Concept · Mid-level
Other ways it was asked
- “How much memory does a string field occupy within a C# object?”
How does garbage collection reclaim unused memory in .NET?
Asked once · last asked Jan 28 · Concept · Mid-level
What is the disposable pattern in .NET, how does it work, and when should you use it?
Asked once · last asked Apr 2 · Concept · Mid-level
Other ways it was asked
- “What is the disposable pattern in .NET, and how does it work?”
- “When should you use the disposable pattern?”
What construct does a using statement implement under the hood?
Asked once · last asked Apr 2 · Concept · Mid-level
What is the purpose of Dispose in .NET, and does it remove an object from memory?
Asked once · last asked Apr 2 · Concept · Mid-level
When is Dispose called automatically in .NET, and when must it be called manually?
Asked once · last asked Apr 2 · Concept · Mid-level
What is the difference between a finalizer and Dispose?
Asked once · last asked Apr 2 · Concept · Mid-level
What is the default stack size for a .NET thread?
Asked once · last asked May 7 · Concept · Mid-level
What is boxing in C#, and how can frequent boxing affect application performance? Give a concrete example.
Asked once · last asked Aug 6 · Concept · Mid-level
What is the difference between value types and reference types in C#, and how do they relate to the stack and heap?
Asked once · last asked Sep 10 · Concept · Mid-level
Where is a byte field, such as age, stored within a .NET User object?
Asked once · last asked Sep 10 · Concept · Mid-level
In .NET, is where a value is stored determined by its type, or by other factors?
Asked once · last asked Sep 10 · Concept · Mid-level
Show 11 more
How does .NET determine the structure of data stored in an object's memory?
Asked once · last asked Sep 10 · Concept · Senior
Why should you account for string memory usage when estimating the size of a class instance?
Asked once · last asked Sep 10 · Concept · Mid-level
In C#, what happens to memory when a struct contains a string field?
Asked once · last asked Sep 10 · Concept · Senior
Why does C# provide GC.Collect, and when might you use it?
Asked once · last asked Sep 21 · Concept · Mid-level
How does memory management in .NET and C# differ from memory management in C++?
Asked once · last asked Sep 29 · Concept · Senior
What .NET tools or techniques can help optimize memory usage, and how do they work?
Asked once · last asked Oct 2 · Concept · Senior
What is the garbage collector in C#?
Asked once · last asked Sep 21 · Concept · Junior
Other ways it was asked
- “Can you explicitly invoke the garbage collector in C#?”
What is the process called when a C# value type is converted to an object or another reference type?
Asked once · last asked Jan 28 · Concept · Junior
Which .NET component determines when objects are released and memory is freed?
Asked once · last asked Sep 4 · Concept · Junior
Why do people say that a variable is stored on the stack in .NET?
Asked once · last asked Sep 10 · Concept · Mid-level
In C#, does the garbage collector clean heap memory, stack memory, or both?
Asked once · last asked Sep 21 · Concept · Junior
.NET dependency injection, design patterns and testing interview questions
Work through questions on service registration and lifetimes, SOLID principles, component design, design patterns, unit testing, and mocking. 24 questions.
What are the SOLID principles, and how do they influence your approach to designing C# classes and services?
Asked once · last asked Sep 28 · Concept · Mid-level
In MSTest, what's the difference between the TestInitialize and ClassInitialize attributes?
Asked once · last asked Jun 12 · Concept · Junior
How do parameterized tests work in NUnit or xUnit?
Asked once · last asked Jun 12 · Concept · Mid-level
What are async/await, LINQ, dependency injection, and common design patterns in C#, and when would you use them?
Asked once · last asked Jun 25 · Concept · Mid-level
What patterns or libraries can you use in .NET to separate application components?
Asked once · last asked Jul 16 · Concept · Mid-level
How would you implement the Strategy pattern in C# for a database system without switch statements and select the correct strategy at runtime?
Asked once · last asked Aug 4 · Scenario · Senior
Other ways it was asked
- “How would you implement the Strategy pattern in C# without switch statements, and select the correct strategy at runtime?”
How do you inject a service into an ASP.NET Core MVC controller, what service lifetime would you typically use, and why does that choice matter in the context of a web request?
Asked once · last asked Aug 12 · Concept · Mid-level
In ASP.NET Core, what is the difference between IServiceCollection and IServiceProvider, and when is each used?
Asked once · last asked Sep 10 · Concept · Mid-level
When, if ever, is it acceptable to resolve services directly from IServiceProvider using the Service Locator pattern, and what are the risks?
Asked once · last asked Sep 10 · Scenario · Senior
How would you bind a Save command in XAML using MVVM and WPF?
Asked once · last asked Sep 15 · Tooling · Mid-level
What is the code line used to register a transient service in ASP.NET Core?
Asked once · last asked Sep 18 · Write code · Junior
What is the difference between AddScoped and TryAddScoped?
Asked once · last asked Sep 29 · Concept · Senior
Show 9 more
What happens when AddScoped and TryAddScoped are both used to register the same service?
Asked once · last asked Sep 29 · Scenario · Senior
In an ASP.NET Core controller, what would you inject: a concrete class or an abstraction such as an interface?
Asked once · last asked Oct 15 · Concept · Mid-level
Where do you register which class implements an interface in an ASP.NET Core application?
Asked once · last asked Oct 15 · Concept · Mid-level
What are the main differences in dependency injection between .NET Framework and .NET 10?
Asked once · last asked Oct 23 · Concept · Senior
What are the service lifetimes in .NET Core?
Asked once · last asked Aug 31 · Concept · Junior
Other ways it was asked
- “How do the different service lifetimes in .NET Core differ?”
Name two popular mocking frameworks for .NET.
Asked once · last asked Feb 27 · Concept · Junior
What are the main parts of a typical C# unit test method, and what steps would you follow inside it?
Asked once · last asked Jun 12 · Concept · Junior
Other ways it was asked
- “What does a typical unit test method look like in C#? What are its main parts, and what steps would you follow inside the method?”
Can you name a few testing frameworks commonly used in C#?
Asked once · last asked Jun 12 · Concept · Junior
What kinds of dependencies do you inject in a .NET Core application?
Asked once · last asked Oct 15 · Concept · Junior
LINQ and Entity Framework interview questions
Data questions cover LINQ queries, deferred execution, database access, ORM choices, Entity Framework behavior, and serialization formats. 30 questions.
How do you handle Entity Framework's N+1 query problem?
Asked in 2 of 95 interviews · last asked Oct 10 · Scenario · Mid-level
Other ways it was asked
- “What is the N+1 query problem in Entity Framework Core? Give a concrete example of how it occurs and how you would fix it.”
What is change tracking in Entity Framework, and when would you use it?
Asked in 2 of 95 interviews · last asked Sep 10 · Concept · Mid-level
Other ways it was asked
- “What is change tracking in Entity Framework, and what problems can it cause?”
What are the differences between the code-first and database-first approaches in Entity Framework, and when would you use each?
Asked in 2 of 95 interviews · last asked Oct 9 · Concept · Mid-level
Other ways it was asked
- “What are the differences between code-first and database-first approaches in Entity Framework Core?”
How do First, Single, FirstOrDefault, and SingleOrDefault differ in LINQ?
Asked in 2 of 95 interviews · last asked Oct 16 · Concept · Mid-level
Other ways it was asked
- “What is the difference between First and Single?”
- “What is the difference between FirstOrDefault and SingleOrDefault?”
What is the difference between serialization and deserialization?
Asked in 2 of 95 interviews · last asked Jun 16 · Concept · Junior
Other ways it was asked
- “What are serialization and deserialization?”
What is LINQ, and how does it work in .NET?
Asked in 2 of 95 interviews · last asked Oct 2 · Concept · Junior
Other ways it was asked
- “What is LINQ, and what challenges can arise when using it?”
Why can marking every property of an entity as modified in Entity Framework be dangerous?
Asked once · last asked Jul 16 · Concept · Mid-level
Other ways it was asked
- “What are the consequences of marking every property of an entity as modified in Entity Framework?”
When does a deferred query execute if you materialize its results by calling ToArray?
Asked once · last asked Jan 28 · Concept · Mid-level
If a deferred query is created from an empty collection and the collection is modified before ToArray is called, what will ToArray return?
Asked once · last asked Jan 28 · Scenario · Mid-level
What is the difference between lazy loading and eager loading in Entity Framework?
Asked once · last asked Jan 31 · Concept · Mid-level
Can you explain what XML serialization is and how it differs from other serialization formats like JSON?
Asked once · last asked Jun 16 · Concept · Mid-level
In C#, what class would you use to perform XML serialization, and can you describe how you would use it to serialize an object?
Asked once · last asked Jun 16 · Tooling · Mid-level
Show 17 more
If you have a property in your class that you don't want to include in the XML output, how would you handle that using attributes?
Asked once · last asked Jun 16 · Concept · Mid-level
How do System.Text.Json and Newtonsoft.Json differ, and when would you choose each?
Asked once · last asked Jun 16 · Concept · Mid-level
Other ways it was asked
- “In modern C#, what are the two main libraries you can use for JSON serialization, and what's a key difference between them?”
- “What are the advantages and feature differences between System.Text.Json and Newtonsoft.Json, and why might someone choose one over the other?”
How does XML serialization handle collections differently from JSON serialization? What are some key considerations when serializing lists or arrays?
Asked once · last asked Jun 16 · Concept · Mid-level
What do the search term, page, page size, and cancellation token parameters do in a repository method?
Asked once · last asked Jul 20 · Concept · Mid-level
What problems can occur if you call AsEnumerable too early in a LINQ to Entity Framework query, especially regarding performance and filtering?
Asked once · last asked Aug 4 · Scenario · Senior
What are the differences between method and query syntax in LINQ, and when would you use each?
Asked once · last asked Sep 4 · Concept · Mid-level
What is an ORM, and how does Dapper differ from Entity Framework?
Asked once · last asked Sep 10 · Concept · Mid-level
How do code-first migrations work in Entity Framework?
Asked once · last asked Sep 10 · Concept · Mid-level
What is the recommended lifetime for an Entity Framework DbContext, and why should it not be shared across parallel operations?
Asked once · last asked Sep 10 · Concept · Senior
How would you use LINQ to find users whose names start with an uppercase N, and why might some LINQ expressions not translate to SQL?
Asked once · last asked Sep 10 · Write code · Mid-level
How can Protocol Buffers be used to process or transport files produced by a C# system?
Asked once · last asked Sep 15 · Concept · Mid-level
What is the role of Entity Framework or other ORMs in a .NET application, and when might you avoid using them?
Asked once · last asked Sep 28 · Concept · Mid-level
How would you implement the insertion of a new entity in an ASP.NET Core application?
Asked once · last asked Oct 15 · Scenario · Mid-level
How do you add a new table in Entity Framework?
Asked once · last asked Mar 12 · Tooling · Mid-level
Other ways it was asked
- “How do you add a new table using the database-first approach in Entity Framework?”
Can you explain what serialization is and why we use it in C#?
Asked once · last asked Jun 16 · Concept · Junior
If you want to change the name of a property in the JSON output, what attribute would you use with System.Text.Json?
Asked once · last asked Jun 16 · Concept · Junior
What approaches to database access do you know and use in .NET?
Asked once · last asked Sep 10 · Concept · Mid-level
C# async, await and multithreading interview questions
Check questions about tasks, threads, async execution, cancellation, exceptions, synchronization, parallelism, deadlocks, and limits on concurrent work. 68 questions.
Why can Task.Run be an anti-pattern in server code, and what should you use instead?
Asked in 2 of 95 interviews · last asked May 16 · Scenario · Senior
Other ways it was asked
- “Can you describe a scenario where using Task.Run is an anti-pattern in server code, and explain what you would do instead?”
- “Can you describe a scenario where using Task.Run is an anti-pattern in server code?”
- “What should you use instead of Task.Run in server code when it is an anti-pattern, and why?”
How do async deadlocks happen in .NET, and how do you prevent them in libraries and ASP.NET Core?
Asked in 2 of 95 interviews · last asked Jun 11 · Concept · Mid-level
Other ways it was asked
- “How do you reason about async/await deadlocks in .NET, and what patterns do you implement to prevent them in library code versus ASP.NET Core request pipelines?”
- “How can async/await and Task-based programming help avoid deadlocks in C#?”
How would you diagnose and fix blocking and ThreadPool starvation in an ASP.NET Core application?
Asked in 2 of 95 interviews · last asked Sep 18 · Scenario · Senior
Other ways it was asked
- “Your ASP.NET Core API shows intermittent latency spikes traced to sync-over-async and thread pool starvation. How would you diagnose the issue and redesign the execution flow?”
- “Where would you start diagnosing rising latency and ThreadPool queue length in ASP.NET Core when CPU utilization is low?”
- “How would you confirm that threads are blocked or stalled in an ASP.NET application?”
What happens when you use Task.Result or Wait instead of awaiting an asynchronous operation?
Asked in 2 of 95 interviews · last asked Oct 10 · Concept · Mid-level
Other ways it was asked
- “In .NET, what does Task.Result do, and should it be used to retrieve a result from an asynchronous operation?”
- “What is the impact of using `.Wait()` or `.Result` with asynchronous tasks?”
Can a C# async method omit await, and how does it execute?
Asked in 2 of 95 interviews · last asked Oct 16 · Concept · Mid-level
Other ways it was asked
- “In an async method, is it mandatory to use the await keyword?”
- “If we declare a method async but do not use await, will it work synchronously or asynchronously?”
How does exception handling differ between async Task and async void methods in C#?
Asked once · last asked May 11 · Concept · Senior
Does .NET provide a synchronization context by default?
Asked once · last asked Jan 28 · Concept · Senior
What is a cancellation token in .NET, and why is it needed?
Asked once · last asked Jan 28 · Concept · Mid-level
When would you choose ValueTask over Task, and what potential pitfalls are there?
Asked once · last asked Mar 16 · Concept · Senior
Why do C# async methods typically return Task?
Asked once · last asked May 11 · Concept · Mid-level
Why should you generally avoid async void methods in C#?
Asked once · last asked May 11 · Concept · Mid-level
Other ways it was asked
- “What is the main reason you should never use an async void method?”
What performance and exception-handling drawbacks can arise from using Task.Run in server code, including context-switching overhead?
Asked once · last asked May 16 · Concept · Mid-level
ASP.NET Core MVC and Web API interview questions
ASP.NET Core questions cover middleware, routing, controllers, binding, validation, filters, responses, error handling, API documentation, and web UI frameworks. 42 questions.
How do you write custom middleware in ASP.NET Core?
Asked in 2 of 95 interviews · last asked Oct 10 · Tooling · Mid-level
Other ways it was asked
- “What are the use cases for writing custom middleware in ASP.NET Core?”
- “Why would you write custom middleware in ASP.NET Core when standard middleware already exists?”
- “How do you implement custom middleware in ASP.NET Core?”
What is the difference between middleware and filters, and when should each be used?
Asked in 2 of 95 interviews · last asked Oct 16 · Concept · Mid-level
Other ways it was asked
- “What is the difference between middleware and a filter?”
In ASP.NET Core MVC, what is the difference between conventional routing and attribute routing, and when would you choose one approach over the other?
Asked in 2 of 95 interviews · last asked Aug 12 · Concept · Mid-level
Other ways it was asked
- “How does ASP.NET Core determine which controller action should handle an incoming request, and what is the difference between attribute routing and conventional routing?”
How does attribute routing work in ASP.NET Core Web API? Specifically, how do you map an action method to a particular URL and HTTP verb?
Asked in 2 of 95 interviews · last asked Aug 15 · Tooling · Junior
Other ways it was asked
- “How does attribute routing work in an ASP.NET Core Web API, and how do you map an action to a specific URL and HTTP method?”
How do you return data and appropriate HTTP status codes from ASP.NET Core API actions?
Asked in 2 of 95 interviews · last asked Aug 15 · Tooling · Junior
Other ways it was asked
- “When building a RESTful service in ASP.NET Core, how do you ensure controller actions return appropriate HTTP status codes, and what helpers does the framework provide to make this easier?”
- “How do you return an HTTP status code along with data from a Web API action? What helper methods does the controller base class provide for this?”
How do you handle exceptions globally in ASP.NET Core, and how do middleware and exception filters differ?
Asked in 2 of 95 interviews · last asked Sep 18 · Tooling · Mid-level
Other ways it was asked
- “How would you implement custom error handling in a REST API using ASP.NET Core, what mechanisms does it provide, and how do exception filters differ from middleware-based error handling?”
- “How do you handle exceptions globally in an ASP.NET Core application?”
How does ASP.NET Core bind request data to action parameters, and how do data annotations support validation?
Asked in 2 of 95 interviews · last asked Aug 15 · Concept · Mid-level
Other ways it was asked
- “How does data from an HTTP request, such as form data or query strings, get mapped to action method parameters, and what role do data annotations play in this process?”
- “What is model binding in ASP.NET Core Web API, and how does the framework determine whether to read data from the URL, the query string, or the request body?”
How do MVC controllers and API controllers differ in ASP.NET Core?
Asked in 2 of 95 interviews · last asked Sep 19 · Concept · Mid-level
Other ways it was asked
- “How does ASP.NET Core Web API differ from ASP.NET Core MVC? What capabilities does Web API provide that MVC doesn't, and are there things MVC can do that Web API typically doesn't handle?”
- “Can you explain the difference between the MVC controller and the API controller?”
Why would you use Blazor Server instead of Blazor WebAssembly?
Asked in 2 of 95 interviews · last asked Sep 1 · Concept · Mid-level
Other ways it was asked
- “How do Blazor Server and Blazor WebAssembly differ, and what factors guide choosing between them?”
In Blazor, what is a cascading value?
Asked once · last asked Feb 27 · Concept · Junior
What is model validation in ASP.NET Core, and why is it important?
Asked once · last asked Feb 27 · Concept · Junior
What does the [ApiController] attribute do in ASP.NET Core?
Asked once · last asked Jul 27 · Concept · Junior
Other ways it was asked
- “What does the API controller attribute do?”
ASP.NET Core authentication and security interview questions
Security questions cover authentication, authorization, claims, cookies, JWT validation, Identity, CORS, HTTPS, password hashing, and secure configuration. 15 questions.
How do you manage ASP.NET Core configuration and securely store secrets such as API keys and connection strings?
Asked in 2 of 95 interviews · last asked Aug 5 · Tooling · Mid-level
Other ways it was asked
- “How do you manage configuration using appsettings.json and a secret store?”
- “How does ASP.NET Core handle application configuration, and what are the best practices for storing sensitive data such as API keys or connection strings?”
Why should you not use GetHashCode to hash passwords?
Asked once · last asked Jan 28 · Concept · Mid-level
Other ways it was asked
- “Can GetHashCode be used to hash passwords stored in a database?”
- “What is the main problem with using GetHashCode for password hashing?”
In ASP.NET Core, what is a claim, and what kind of information can it hold about a user?
Asked once · last asked Aug 21 · Concept · Junior
Can you explain how ClaimsPrincipal, ClaimsIdentity, and a claim relate to each other, and how they work together to represent an authenticated user?
Asked once · last asked Aug 21 · Concept · Mid-level
When a user successfully logs in using cookie-based authentication in ASP.NET Core, what happens behind the scenes? How is the cookie created and used?
Asked once · last asked Aug 21 · Concept · Mid-level
What is sliding expiration in cookie authentication, and how does it affect the session lifetime and security?
Asked once · last asked Aug 21 · Concept · Mid-level
When ASP.NET Core receives a JWT, how does it validate the token, what does it check, and where is the signing key configured?
Asked once · last asked Aug 21 · Concept · Mid-level
What is ASP.NET Core Identity, and what does it provide out of the box for developers?
Asked once · last asked Aug 21 · Concept · Junior
What does UserManager do in ASP.NET Core Identity? Can you give a concrete example of an operation it handles?
Asked once · last asked Aug 21 · Concept · Junior
What does the Authorize attribute do in ASP.NET Core, and what happens when an unauthenticated user tries to access a protected endpoint?
Asked once · last asked Aug 21 · Concept · Junior
Why is HTTPS required for authentication in a production ASP.NET Core application?
Asked once · last asked Aug 21 · Concept · Junior
Where and how is CORS used in .NET?
Asked once · last asked Sep 16 · Tooling · Mid-level
Show 2 more
How is an authentication token structured, and how do you use it with controller or action attributes?
Asked once · last asked Oct 9 · Concept · Mid-level
How do you enable CORS in an ASP.NET application?
Asked once · last asked Mar 12 · Tooling · Mid-level
Other ways it was asked
- “How do you configure CORS to allow a particular origin in an ASP.NET application?”
.NET system design and production interview questions
Review questions on architecture and technology choices for web, desktop, and Unity apps, plus integration, scaling, reliability, diagnostics, modernization, and CI/CD. 37 questions.
What are the technical differences between Java and C#, and when is each more useful?
Asked once · last asked Jun 26 · Concept · Mid-level
Other ways it was asked
- “What are the technical differences between Java and C#, and when would you choose one over the other?”
What types of triggers are available in WPF?
Asked once · last asked Sep 15 · Concept · Mid-level
Other ways it was asked
- “How would you write a trigger in WPF?”
What is the difference between a .NET application calling SQL Server and SQL Server calling .NET code?
Asked once · last asked Sep 25 · Concept · Mid-level
How would you design the system and choose the technology stack for the legacy ASP.NET Web Forms application with a SQL database and RabbitMQ?
Asked once · last asked Oct 19 · Design · Senior
Other ways it was asked
- “How would you design the system and choose the technology stack for the legacy ASP.NET Web Forms application with a SQL database, RabbitMQ, device messaging, and APIs, making it multi-tenant?”
For a .NET application, what key components would you include in a CI/CD setup, and how would you build the pipeline?
Asked once · last asked Feb 9 · Design · Mid-level
What are some common production issues related to configuration, networking, and resource limits in dockerized .NET services, and how do you typically detect them early?
Asked once · last asked Feb 16 · Scenario · Senior
When exposing a service for external consumers, how would you choose between providing API endpoints and publishing a NuGet package?
Asked once · last asked Apr 2 · Design · Mid-level
How do you evaluate and select a logging strategy that supports debugging under load for your .NET API? What key factors influence your decision-making?
Asked once · last asked May 16 · Design · Senior
When would you use C#/.NET versus Angular, and what is the difference between them?
Asked once · last asked Jun 25 · Concept · Junior
How can microservices built with .NET Core expose functionality through REST APIs?
Asked once · last asked Jun 25 · Concept · Mid-level
How do you approach requirements analysis when developing applications with .NET and T-SQL?
Asked once · last asked Jun 26 · Scenario · Mid-level
How would you structure a .NET backend to meet a set of requirements?
Asked once · last asked Jul 16 · Design · Senior
Show 25 more
How would you decide how to separate components in a .NET backend architecture?
Asked once · last asked Jul 16 · Behavioral · Senior
Other ways it was asked
- “How did you decide how to separate the components in your .NET backend architecture?”
How would you implement a generic object pool for MonoBehaviour components in Unity?
Asked once · last asked Jul 17 · Write code · Mid-level
How would you implement a return method for a generic object pool in Unity?
Asked once · last asked Jul 17 · Write code · Mid-level
How would you design an e-commerce system in .NET with microservices, and would you use synchronous HTTP calls or a message broker like Azure Service Bus? How would you guarantee reliability if one service fails?
Asked once · last asked Sep 1 · Design · Senior
How would you investigate and improve an ASP.NET Core API that suddenly gets 10 times more traffic, with CPU spikes, slow responses, and timeouts?
Asked once · last asked Sep 1 · Scenario · Senior
How would you design the end-to-end flow from a sensor sending a measurement to that measurement appearing on a Blazor dashboard?
Asked once · last asked Sep 1 · Design · Senior
What problem does IHttpClientFactory solve compared to creating a new HttpClient manually, and how do you handle DNS changes and resiliency?
Asked once · last asked Sep 10 · Concept · Senior
How would you create a button in XAML and demonstrate data binding?
Asked once · last asked Sep 15 · Write code · Mid-level
If you were reviewing a PR that introduces a new .NET microservice endpoint, what are the top five correctness and maintainability checks you'd perform before approving it?
Asked once · last asked Sep 16 · Scenario · Senior
How would you design a production AI chat application with React and ASP.NET Core to stream responses while controlling latency and cost?
Asked once · last asked Sep 18 · Design · Senior
What happens in ASP.NET Core if 1,000 concurrent requests are all waiting on an external API, and how would you prevent the system from becoming overloaded?
Asked once · last asked Sep 18 · Design · Senior
How would you prepare a single-instance ASP.NET Core API for horizontal scaling in the cloud?
Asked once · last asked Sep 18 · Design · Senior
How would you choose between a REST API and SignalR for a chat application, and why?
Asked once · last asked Sep 18 · Design · Mid-level
How can you connect SQL Server with .NET code using APIs or executables?
Asked once · last asked Sep 25 · Concept · Mid-level
How would you understand a legacy .NET Framework solution with many projects and dependencies before making changes?
Asked once · last asked Oct 2 · Scenario · Senior
What prompt would you give an AI assistant to convert a Windows Forms application into a web page?
Asked once · last asked Oct 9 · Scenario · Mid-level
What security risks might arise from not upgrading .NET?
Asked once · last asked Oct 9 · Scenario · Mid-level
Why would you choose ASP.NET Core over Node.js?
Asked once · last asked Oct 19 · Concept · Senior
Which would you recommend for this application, ASP.NET Core or Express.js, and why?
Asked once · last asked Oct 19 · Design · Senior
How do you optimize a .NET application’s performance while keeping it reliable as you add or update features?
Asked once · last asked Oct 23 · Scenario · Senior
How would you approach starting a project that uses .NET on the backend and React on the frontend?
Asked once · last asked Jun 22 · Scenario · Mid-level
What is WinForms used for?
Asked once · last asked Jun 26 · Tooling · Junior
Which do you prefer, C# or Java with Spring Boot, and why?
Asked once · last asked Jul 16 · Concept · Mid-level
What are the differences between Java, C#, and JavaScript running on Node.js?
Asked once · last asked Jul 27 · Concept · Mid-level
What are the key differences between developing applications with .NET and with Express/Node.js?
Asked once · last asked Sep 2 · Concept · Mid-level
Other ways it was asked
- “How do you feel about the differences working with .NET versus Express/Node from your perspective?”
Live coding round next? Coding mode in the MeetAssist desktop app solves the problem on your screen, with your phone as the remote.
Related interview questions
- Software Engineer interview questions
- QA Engineer interview questions
- Data Engineer interview questions
- DevOps Engineer interview questions
- Machine Learning Engineer interview questions
- Python interview questions
- Java interview questions
- JavaScript interview questions
- TypeScript interview questions
- C++ interview questions
- PHP and Laravel interview questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every C# and .NET interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
95 interviews, 54 candidates, Jan 2026 to Oct 2026. Updated every month with new interviews.
Or add the Chrome extension