Mid
From PDF
OOP
C# 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() {} }
Q&A
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png