.NET Full Stack Interview Questions & Answers
All 200 unique questions in one place — 63 easy, 94 medium, 43 hard — grouped by topic.
Practise by topic
Practise the way your interview works
What is the CLR and what does it do?
Show answer
Explain value types and reference types in C#.
Show answer
What are boxing and unboxing?
Show answer
When should you use StringBuilder instead of string?
Show answer
Write an extension method that checks whether a string is a valid Indian mobile number.
Show answer
What is the difference between var, dynamic and object?
Show answer
A report builder concatenates 50,000 rows into one string with += and takes several seconds. What do you change?
Show answer
Write a C# method to reverse a string without using Array.Reverse or LINQ.
Show answer
Tell me about a time you had to learn a new C# or .NET feature quickly.
Show answer
Why do you want to work as a .NET full stack developer?
Show answer
What is the difference between const, readonly and static readonly?
Show answer
Explain the ref, out and in parameter modifiers.
Show answer
What are nullable value types and nullable reference types?
Show answer
Show how to implement IDisposable and use the using statement.
Show answer
What is the difference between == and Equals() in C#?
Show answer
What are record types and when would you use them?
Show answer
You are designing a type to hold a 2D point used millions of times in a calculation. Struct or class?
Show answer
Write a switch expression using pattern matching to calculate shipping cost.
Show answer
What is the difference between throw and throw ex inside a catch block?
Show answer
Show a class using a primary constructor with dependency injection.
Show answer
How does garbage collection work in .NET and what are generations?
Show answer
What are Span<T> and Memory<T> and why do they matter for performance?
Show answer
A .NET API's memory keeps growing in production until the pod restarts. How do you investigate?
Show answer
What is the difference between JIT compilation and Native AOT in .NET?
Show answer
What are the four pillars of object-oriented programming?
Show answer
What is the difference between an abstract class and an interface in C#?
Show answer
What is the difference between method overloading and method overriding?
Show answer
What does the sealed keyword do?
Show answer
Show constructor chaining in C#.
Show answer
What is the difference between compile-time and runtime polymorphism?
Show answer
Show encapsulation using properties, including init-only and validation.
Show answer
What are partial classes and partial methods?
Show answer
You need to add a new method to a widely implemented interface without breaking existing classes. How can you do it?
Show answer
Explain the virtual, override and new keywords.
Show answer
Explain the access modifiers in C#, including protected internal and private protected.
Show answer
What is the difference between a static class and a singleton?
Show answer
Explain the SOLID principles briefly.
Show answer
Show an example of the Dependency Inversion Principle in C#.
Show answer
A teammate created a deep inheritance chain Employee > Manager > SeniorManager > RegionalHead to add features. What would you suggest?
Show answer
What is a delegate in C#?
Show answer
How are events different from plain delegates?
Show answer
Show how Func, Action and Predicate are used.
Show answer
Which design patterns do you commonly see in ASP.NET Core projects?
Show answer
What is the difference between a shallow copy and a deep copy?
Show answer
Tell me about a time you refactored messy code that others depended on.
Show answer
How do you explain good object-oriented design to a junior developer on your team?
Show answer
A PaymentService has a large if-else on payment type (card, UPI, netbanking, wallet) and every new method means editing it. How do you refactor?
Show answer
Write a thread-safe singleton in C#.
Show answer
Give an example of a Liskov Substitution Principle violation and how to fix it.
Show answer
What is LINQ and why is it useful?
Show answer
When would you choose an array, a List<T> or a LinkedList<T>?
Show answer
When would you use a HashSet<T>?
Show answer
Explain First, FirstOrDefault, Single and SingleOrDefault.
Show answer
Find the second highest salary from a list using LINQ.
Show answer
What are generics and what benefits do they give?
Show answer
Why is Any() usually better than Count() > 0?
Show answer
Sort a list of students by marks descending, then by name ascending.
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 deferred execution in LINQ?
Show answer
What is the difference between IEnumerable and IQueryable?
Show answer
What is the difference between Select and SelectMany?
Show answer
Using LINQ, group employees by department and get the count and average salary.
Show answer
Write a LINQ query that joins orders with customers and returns customer name and order total.
Show answer
What are generic constraints? Give examples.
Show answer
Show how yield return works with an example.
Show answer
Your code builds a LINQ query over a database, then calls Count() and later loops over it, and the logs show two SQL queries. Why, and how do you fix it?
Show answer
A job matches 2 lakh uploaded records against 2 lakh existing IDs using list.Where(x => existingIds.Contains(x.Id)) and takes minutes. What is wrong?
Show answer
Show the newer LINQ methods Chunk, DistinctBy and MaxBy.
Show answer
Tell me about a time you improved the performance of slow code.
Show answer
How does Dictionary<TKey, TValue> work internally?
Show answer
Explain covariance and contravariance in C# generics.
Show answer
Several threads update an in-memory Dictionary cache in a singleton service and you see corrupted data and exceptions. What would you use instead?
Show answer
You load 5,000 pincode-to-city mappings at startup and read them millions of times a day from many threads. Which collection would you use?
Show answer
An API endpoint calls _db.Orders.ToList().Where(o => o.CustomerId == id) and is slow as the table grows. Explain and fix it.
Show answer
What do async and await do in C#?
Show answer
A dashboard API calls three independent services one after another, each taking about 1 second. How can you make it faster?
Show answer
What is the difference between concurrency and parallelism?
Show answer
What is the difference between CPU-bound and I/O-bound work, and how do you handle each in .NET?
Show answer
What is the difference between a Task and a Thread?
Show answer
Why does using async in ASP.NET Core controllers improve scalability?
Show answer
Why should you avoid async void methods?
Show answer
Show how Task.WhenAll and Task.WhenAny are used.
Show answer
How do you use CancellationToken in an ASP.NET Core API?
Show answer
What does the lock keyword do?
Show answer
Demonstrate a race condition on a counter and fix it.
Show answer
You must resize 10,000 images and also call an external API for 10,000 records. Which approach do you use for each task?
Show answer
Show how to stream data with IAsyncEnumerable.
Show answer
Write a BackgroundService that cleans expired OTPs every 5 minutes.
Show answer
A developer wraps every database call in Task.Run inside ASP.NET Core controllers to make them async. Is this a good idea?
Show answer
Users trigger a large Excel report that takes 3 minutes, and the HTTP request times out. How would you redesign it?
Show answer
Tell me about a production bug you had to debug under time pressure.
Show answer
A legacy ASP.NET MVC app on .NET Framework hangs when a controller calls GetDataAsync().Result. Why, and how do you fix it?
Show answer
What does ConfigureAwait(false) do and is it needed in ASP.NET Core?
Show answer
Profiling shows a hot cache-lookup method returning Task<T> allocates millions of Task objects. Would ValueTask help?
Show answer
Limit concurrent calls to a third-party API to 5 at a time using SemaphoreSlim.
Show answer
Under load, an API's response time jumps to many seconds while CPU stays low. Thread count keeps rising. What is likely happening?
Show answer
What are System.Threading.Channels and when would you use them?
Show answer
How are exceptions handled in async code, and what is AggregateException?
Show answer
What is a SynchronizationContext?
Show answer
What is ASP.NET Core and what are its main features?
Show answer
What is the middleware pipeline in ASP.NET Core?
Show answer
Explain the transient, scoped and singleton service lifetimes.
Show answer
Show attribute routing for a products controller with route constraints.
Show answer
What is the difference between authentication and authorization in ASP.NET Core?
Show answer
What is CORS and how do you enable it in ASP.NET Core?
Show answer
Which HTTP status codes and methods should a REST API use, and what is the difference between PUT and PATCH?
Show answer
Write custom middleware that logs how long each request takes.
Show answer
What is the difference between controllers and Minimal APIs?
Show answer
How do model binding and validation work in ASP.NET Core Web API?
Show answer
What types of filters exist in ASP.NET Core MVC?
Show answer
Implement global exception handling that returns ProblemDetails.
Show answer
Configure JWT bearer authentication in an ASP.NET Core API.
Show answer
Show how to bind configuration from appsettings.json using the Options pattern.
Show answer
How does logging work in ASP.NET Core?
Show answer
An API creates a new HttpClient inside a using block for every outgoing call, and under load you see socket exhaustion errors. How do you fix it?
Show answer
You must change an API response format, but an older mobile app version still calls it. How do you avoid breaking those users?
Show answer
Describe an API you designed end to end and the decisions you made.
Show answer
Where should you store secrets like connection strings and API keys in an ASP.NET Core app?
Show answer
Tell me about a disagreement with the front-end team over an API contract and how you resolved it.
Show answer
A singleton CacheService injects AppDbContext, and users start seeing stale data and occasional 'a second operation was started on this context' errors. What is wrong?
Show answer
Your product API runs on four instances behind a load balancer and needs caching. Which ASP.NET Core caching options would you consider?
Show answer
Add rate limiting to a login endpoint in ASP.NET Core.
Show answer
Your product API must handle a festive sale with 10 times normal traffic. How do you prepare it?
Show answer
Access tokens in your app expire in 15 minutes and users complain about being logged out. How do you implement refresh tokens securely?
Show answer
What is Entity Framework Core?
Show answer
What is the difference between code-first and database-first approaches?
Show answer
What are DbContext and DbSet, and what lifetime should DbContext have?
Show answer
Which commands do you use to create and apply EF Core migrations?
Show answer
How do you keep up with new .NET and EF Core releases?
Show answer
Explain eager, lazy and explicit loading in EF Core.
Show answer
A page listing 100 orders with customer names runs 101 SQL queries. What is the problem and how do you fix it?
Show answer
A read-only product listing endpoint in EF Core uses a lot of memory and CPU. What simple change helps, and why?
Show answer
Configure a one-to-many relationship between Customer and Order using the Fluent API.
Show answer
How does EF Core handle many-to-many relationships?
Show answer
How do you run raw SQL safely in EF Core?
Show answer
Show bulk update and delete with ExecuteUpdate and ExecuteDelete.
Show answer
How do you use an explicit transaction in EF Core across multiple SaveChanges calls?
Show answer
A developer runs two EF Core queries in parallel with Task.WhenAll on the same DbContext and gets an InvalidOperationException. Why?
Show answer
Explain a technical trade-off you had to justify to a manager or client.
Show answer
Implement paging for a product list in EF Core.
Show answer
How does change tracking work and what are entity states?
Show answer
Two support agents edit the same customer record at once and one agent's changes silently overwrite the other's. How do you prevent this?
Show answer
Implement soft delete with a global query filter.
Show answer
What techniques improve EF Core query performance?
Show answer
An EF Core query that includes Items and Payments for each order returns a huge, duplicated result set. What is happening and how do split queries help?
Show answer
Your team debates wrapping EF Core in a generic repository. What is your view?
Show answer
A complex reporting query written in EF Core is slow and hard to tune. When would you move it to Dapper?
Show answer
You must rename a column and split a Name field into FirstName and LastName in a production database with live data. How do you deploy safely?
Show answer
Your multi-tenant SaaS app keeps all tenants in one database. How do you make sure EF Core queries never return another tenant's data?
Show answer
What is the difference between a primary key and a unique key in SQL Server?
Show answer
Explain the different types of SQL joins.
Show answer
Write a SQL Server query to find the second highest salary.
Show answer
Write a query to find duplicate email addresses and delete the extra rows, keeping the lowest Id.
Show answer
What is the difference between WHERE and HAVING?
Show answer
What is the difference between DELETE, TRUNCATE and DROP?
Show answer
Explain normalisation and the first three normal forms.
Show answer
What is SQL injection and how do you prevent it in a .NET application?
Show answer
What are your strengths and weaknesses as a developer?
Show answer
Where do you see yourself in five years?
Show answer
What is the difference between a clustered and a non-clustered index?
Show answer
What is the difference between a stored procedure and a user-defined function?
Show answer
Show the difference between ROW_NUMBER, RANK and DENSE_RANK with a query.
Show answer
A query that used to run in 1 second now takes 30 seconds. How do you troubleshoot it?
Show answer
What is the difference between temporary tables and table variables?
Show answer
Write a stored procedure that transfers money between accounts with TRY-CATCH and a transaction.
Show answer
What is a view and what is an indexed view?
Show answer
Tell me about a time you made a mistake that affected data, and what you did.
Show answer
Tell me about a time you worked under a tight deadline.
Show answer
Write a recursive CTE that lists an employee hierarchy with levels.
Show answer
What are ACID properties and the transaction isolation levels in SQL Server?
Show answer
Users report intermittent errors saying their transaction was chosen as a deadlock victim. How do you investigate and fix it?
Show answer
A frequent query on Orders filtered by CustomerId shows expensive key lookups in its execution plan. How would you fix it?
Show answer
A stored procedure is fast for most customers but very slow for one large customer, and sometimes slow for everyone after a restart. What could cause this?
Show answer
An Orders table has 50 million rows and queries are slowing down, but most reports only need the last 12 months. What would you do?
Show answer
Angular or React with ASP.NET Core: how do you choose?
Show answer
What are components and standalone components in Angular?
Show answer
Explain the types of data binding in Angular.
Show answer
Show the useState and useEffect hooks in a React component.
Show answer
What is the virtual DOM in React?
Show answer
What is the difference between props and state in React?
Show answer
Your Angular app on localhost:4200 gets a CORS error when calling the ASP.NET Core API on localhost:5001. How do you fix it?
Show answer
Walk me through a full stack project you built.
Show answer
Why should we hire you as a .NET full stack developer?
Show answer
What are services and dependency injection in Angular?
Show answer
What are signals in Angular and why were they introduced?
Show answer
What is the difference between an RxJS Observable and a Promise?
Show answer
Write an Angular HTTP interceptor that adds a JWT to every API request.
Show answer
Protect an Angular route so only logged-in users can open it.
Show answer
What is the difference between reactive forms and template-driven forms in Angular?
Show answer
Fetch products from an ASP.NET Core API in React with loading and error states.
Show answer
What are useMemo and useCallback used for in React?
Show answer
How do you manage application state in Angular and React apps?
Show answer
Your Angular app's first load is slow on mobile because the main bundle is very large. How does lazy loading of routes help?
Show answer
An admin page renders 20,000 rows in a table and the browser freezes. How do you fix it?
Show answer
How would you deploy an Angular or React front end together with an ASP.NET Core API?
Show answer
How do you handle requirements that keep changing during a sprint?
Show answer
Your security team objects to storing the JWT in localStorage in your Angular app. What are the options?
Show answer
A large Angular dashboard becomes sluggish because change detection runs constantly. How do OnPush and zoneless mode help?
Show answer
Tell me about a time you led a team to deliver a complex feature.
Show answer
Frequently asked questions
What jobs can I get after learning .NET full stack?
You can apply for roles such as .NET developer, ASP.NET Core developer, full stack .NET developer, Angular .NET developer and API developer. IT services firms, banks, insurance, healthcare, consulting and product companies in India regularly hire for these roles, especially in cities like Bengaluru, Hyderabad, Pune, Noida, Gurugram and Chennai. With experience you can grow into senior engineer, technical lead and solution architect positions working on Azure-based enterprise systems.
Who is eligible to learn .NET full stack development?
Students and graduates from B.Tech, BCA, MCA, B.Sc IT or similar backgrounds can start, and working professionals from testing, support or other languages can switch too. You do not need prior .NET experience, but basic computer skills and logical thinking help. Knowing any programming language makes the first weeks easier. Non-IT graduates can also learn it with steady practice, though they should spend extra time on programming fundamentals.
How long does it take to learn .NET full stack?
With regular study of two to three hours a day, most learners become job-ready in about four months: C# and OOP in the first month, SQL Server and EF Core next, then ASP.NET Core Web API and finally Angular or React with deployment. Building two or three complete projects is essential. Becoming confident with advanced topics like performance tuning, architecture and Azure takes further months of real work experience.
Should I learn Angular or React with .NET?
Both are in demand. Angular is very common in Indian enterprise and banking projects that use .NET, because its structure and TypeScript-first approach suit large teams. React is popular in product companies and startups. Learn one well first; Angular is a safe choice if you target IT services and enterprise roles, React if you target product firms. The concepts of components, state and API calls transfer easily between them.
Is there a certification for .NET developers?
Microsoft offers role-based certifications, and the most relevant for .NET full stack developers is Azure Developer Associate (AZ-204), which covers building and deploying apps on Azure. Microsoft Learn also offers free learning paths and credentials for C# and ASP.NET Core. Certifications help your resume, but recruiters care more about projects, GitHub code and how well you answer technical questions, so combine both.
Is .NET still in demand in 2026?
Yes. Modern .NET is open source, cross-platform and among the fastest web frameworks, and Microsoft releases a new version every November, with .NET 10 as the current long-term support release. Banks, insurers, healthcare firms, governments and global capability centres in India run large .NET systems and continue migrating old .NET Framework apps to modern .NET and Azure, which keeps steady demand for skilled developers.