DEV Community

Discussion on: 40+ OOP Interview Questions in 2019

Collapse
 
yaser profile image
Yaser Al-Najjar

Nice refresher!

However, you can implement multiple inheritance in.NET through interfaces.

NEVER do this, contracts aren't meant to achieve multiple inheritance... contracts are mainly to show the ability "able" like IEnumerable, IConfigurable, or even IFly (it can fly).

As you mentioned, composite design pattern is the way to go in a language that doesn't support multi-inheritance like C#.