.net - Difference between multiple inheritance and interfaces in c# -


C # actually supports multiple inheritance, people say that multi-part is supported as an interface? But I do not believe in it.

In literal sense, it does not support many heritage. It can execute multiple interfaces, which offers polymorphic behavior, so you can get some of the benefits of many heritage. However you do not get any base behavior.

If you need a base behavior then a common strategy is for a base class to implement the interface and it is necessary for the derivative classes to override this implementation.

I still need to have multiple heritage, I do not think C # suffers due to deficiency.


Comments