.NET C# interview questions – the kind that interviewers actually ask to test depth, not just theory.
.NET C# interview questions – the kind that interviewers actually ask to test depth, not just theory. I’ll give you a structured list with Basic → Intermediate → Advanced → Architect-level questions.
🔹 Basic Level (C# / .NET Fundamentals)
-
What is the difference between value type and reference type in C#?
-
Explain boxing and unboxing with an example.
-
What are generics in C#? Why do we use them?
-
What is the difference between
const
,readonly
, andstatic
? -
Explain the difference between abstract class and interface.
-
How does Garbage Collection work in .NET?
-
What are extension methods in C#?
-
What’s the difference between
IEnumerable
,ICollection
,IList
, andIQueryable
?
🔹 Intermediate Level (OOP, LINQ, Async, EF)
-
Explain Dependency Injection. How is it implemented in .NET Core?
-
What are async/await keywords in C#? How do they work internally?
-
Difference between
Task
,Thread
, andValueTask
. -
How does LINQ work internally? (Deferred vs Immediate execution)
-
What is the difference between Entity Framework and ADO.NET?
-
Explain lazy loading, eager loading, and explicit loading in Entity Framework.
-
What are delegates and events in C#? Provide an example.
-
Explain Covariance and Contravariance in C# with examples.
🔹 Advanced Level (Architecture & Performance)
-
What is the difference between CLR, CTS, CLS in .NET?
-
Explain difference between .NET Framework, .NET Core, and .NET 5/6/7.
-
What is the difference between Struct and Class in C#?
-
How does the GC generations (0,1,2) work in .NET?
-
What are design patterns you have used in .NET? Example: Singleton, Repository, Factory.
-
How do you handle caching in .NET Core? (MemoryCache, Distributed Cache, Redis)
-
Explain Middleware in .NET Core and the request pipeline.
-
What is the difference between REST API and gRPC in .NET?
🔹 Architect-Level (Enterprise & System Design)
-
How would you design a scalable microservices system in .NET?
-
Difference between Monolith vs Microservices architecture in .NET Core.
-
How do you secure an API using JWT / OAuth 2.0 / IdentityServer?
-
What are CQRS and Event Sourcing? How can they be implemented in .NET?
-
How do you implement global exception handling & logging in .NET Core?
-
What’s the role of Docker & Kubernetes in .NET applications?
-
Explain Circuit Breaker pattern (e.g., with Polly in .NET Core).
-
How do you design a multi-tenant SaaS application in .NET?
✅ These cover theory, coding, and real-world scenarios – perfect for interviews.
Comments
Post a Comment