Mid OOP

Can you inherit multiple abstract classes?

  • No, C# does not allow multiple class inheritance.
  • Use interfaces as a workaround.

interface IFlyable { void Fly(); }

interface IDriveable { void Drive(); }

class FlyingCar : IFlyable, IDriveable { public void Fly() {} public

void Drive() {} }

🔹 Section 8: Interfaces vs Abstract Classes – Interview

Q&A

More from C# Programming Tutorial

All questions for this course