Bird
0
0

Why can't a C# class inherit from multiple abstract classes but can implement multiple interfaces?

hard🧠 Conceptual Q10 of 15
C Sharp (C#) - Interfaces
Why can't a C# class inherit from multiple abstract classes but can implement multiple interfaces?
ABecause abstract classes are sealed by default.
BBecause C# supports single inheritance for classes but multiple interface implementation to avoid ambiguity.
CBecause interfaces contain no methods to inherit.
DBecause abstract classes cannot have constructors.
Step-by-Step Solution
Solution:
  1. Step 1: Understand C# inheritance rules

    C# allows only one base class to avoid complexity and ambiguity.
  2. Step 2: Interfaces allow multiple implementation

    Interfaces define contracts without implementation, so multiple can be implemented safely.
  3. Final Answer:

    Because C# supports single inheritance for classes but multiple interface implementation to avoid ambiguity. -> Option B
  4. Quick Check:

    Single class inheritance, multiple interfaces allowed [OK]
Quick Trick: Single class inheritance; multiple interfaces allowed [OK]
Common Mistakes:
MISTAKES
  • Thinking abstract classes are sealed
  • Believing interfaces have no methods
  • Confusing constructors with inheritance rules

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes