| 1 | What are design patterns, and how are the Singleton, Adapter, and Strategy patterns typically implemented in C#? C# › Design Patterns in C# | C# | Design Patterns in C# | Advanced |
| 2 | How do you implement a thread-safe Singleton pattern in modern C# using Lazy<T>? C# › Design Patterns in C# | C# | Design Patterns in C# | Beginner |
| 3 | How does the Factory Method pattern work in C#, and what problem does it solve? C# › Design Patterns in C# | C# | Design Patterns in C# | Beginner |
| 4 | How would you implement the Decorator pattern in C# to add behavior to an object without modifying its original class? C# › Design Patterns in C# | C# | Design Patterns in C# | Intermediate |
| 5 | How would you implement the CQRS (Command Query Responsibility Segregation) pattern's basic structure in a C# application using MediatR-style handlers? C# › Design Patterns in C# | C# | Design Patterns in C# | Advanced |
| 6 | How would you implement the Chain of Responsibility pattern in C# to process a request through a series of independent handlers? C# › Design Patterns in C# | C# | Design Patterns in C# | Advanced |
| 7 | How would you implement the Strategy pattern in C# using either interfaces or delegates? C# › Design Patterns in C# | C# | Design Patterns in C# | Intermediate |
| 8 | How would you implement the Observer pattern in C# using events, versus using the IObservable<T>/IObserver<T> interfaces from System? C# › Design Patterns in C# | C# | Design Patterns in C# | Advanced |
| 9 | How does the Repository pattern abstract data access, and what interface typically defines its contract? C# › Design Patterns in C# | C# | Design Patterns in C# | Intermediate |
| 10 | How would you implement the Unit of Work pattern alongside the Repository pattern to coordinate multiple repository changes within a single transaction? C# › Design Patterns in C# | C# | Design Patterns in C# | Advanced |
| 11 | How would you implement the Builder pattern using method chaining (a fluent API) to construct a complex object step by step? C# › Design Patterns in C# | C# | Design Patterns in C# | Advanced |
| 12 | How would you implement the 'Liskov Substitution Principle' correctly when designing an abstract class hierarchy, and what's a classic violation example? C# › Interfaces & Abstract Classes | C# | Interfaces & Abstract Classes | Advanced |
| 13 | What is the Inversion of Control (IoC) principle, and how does dependency injection relate to it as one specific technique? C# › Dependency Injection & IoC Principles | C# | Dependency Injection & IoC Principles | Intermediate |
| 14 | How would you implement the Factory pattern using dependency injection to resolve a specific implementation at runtime based on a parameter, when the standard container can't decide statically? C# › Dependency Injection & IoC Principles | C# | Dependency Injection & IoC Principles | Advanced |
| 15 | How would you write a custom IServiceProviderFactory or use a third-party container (like Autofac) to enable advanced DI features not supported by the built-in ASP.NET Core container, like property injection or convention-based registration? C# › Dependency Injection & IoC Principles | C# | Dependency Injection & IoC Principles | Advanced |
| 16 | How does interface segregation (the 'I' in SOLID) guide splitting a large, monolithic interface into several smaller, more focused ones? C# › Interfaces & Abstract Classes | C# | Interfaces & Abstract Classes | Advanced |
| 17 | How would you optimize a LINQ-to-Entities query to avoid the classic 'N+1 query' performance problem when accessing related navigation properties? C# › LINQ | C# | LINQ | Advanced |
| 18 | What is a delegate in C#, and how does it enable passing methods as values? C# › Delegates, Events & Lambdas | C# | Delegates, Events & Lambdas | Beginner |
| 19 | What are extension methods in C#, and how do they let you add functionality to a type you can't modify? C# › Extension Methods | C# | Extension Methods | Intermediate |
| 20 | What is dependency injection, and why does it make a codebase easier to test and maintain? .NET › Dependency Injection | .NET | Dependency Injection | Intermediate |
| 21 | What is reflection, and what basic information can you retrieve from a Type object at runtime? C# › Attributes & Reflection | C# | Attributes & Reflection | Beginner |
| 22 | How do you dynamically create an instance of a type and invoke a method on it using reflection, when the type isn't known at compile time? C# › Attributes & Reflection | C# | Attributes & Reflection | Intermediate |
| 23 | How do you use reflection to read a custom attribute's values off a property at runtime? C# › Attributes & Reflection | C# | Attributes & Reflection | Intermediate |
| 24 | How would you use System.Reflection.Emit or source generators as faster, more modern alternatives to runtime reflection for code generation scenarios? C# › Attributes & Reflection | C# | Attributes & Reflection | Advanced |