📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.

SOLID Principles

Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation and Dependency Inversion in modern C#.

  1. What does the Single Responsibility Principle really mean, and how do you apply it in a .NET codebase without creating hundreds of tiny classes?

    SRP as one reason to change (one actor), spotting violations, splitting by change drivers, and avoiding over-fragmentation.

    Mid-Level Architecture SOLID Principles Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  2. What is the Open/Closed Principle, and how do you apply it in C# without building speculative plug-in frameworks?

    Open for extension, closed for modification; strategy, polymorphism, DI and pattern-based extension; when a switch is fine; avoiding speculative generality.

    Mid-Level Architecture SOLID Principles Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  3. Explain the Liskov Substitution Principle with a C# example of a violation, and how you would detect and fix it.

    Behavioural subtyping, preconditions, postconditions and invariants, NotSupportedException smells, the read-only collection example, and fixing hierarchies.

    Senior Architecture SOLID Principles Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  4. What is the Interface Segregation Principle, and how do you apply it to repositories, services and libraries in .NET?

    Client-specific interfaces, fat interface smells, read and write splits, role interfaces, default interface methods and avoiding interface explosion.

    Mid-Level Architecture SOLID Principles Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  5. What is the Dependency Inversion Principle, how is it different from dependency injection, and how do you apply it in a layered .NET application?

    High-level policy not depending on low-level details, abstraction ownership, DIP versus DI versus IoC containers, ports and adapters, and when not to invert.

    Senior Architecture SOLID Principles Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me