Can anyone explain me
why c# not supporting multiple inheritance since c++ supporting multiple inheritance ? how it is possible ? How c++ supports ?
Can anyone explain me
why c# not supporting multiple inheritance since c++ supporting multiple inheritance ? how it is possible ? How c++ supports ?
From an MSDN blog on C# frequently asked questions you can find this answer. There is also this highly rated Stack Overflow question.
First, a small correction: C# does support multiple interface inheritance. It doesn't support multiple implementation inheritance.
The two big reasons MI isn't supported are:
Chances are good that you can do what you want with multiple interface inheritance anyway.
It adds a lot of complexity to the compiler implementation.
IMO, in many cases, the availability of multiple inheritance in a language causes that feature to be frequently abused. Single inheritance already gets wedged into a lot of class hierarchies unnecessarily when something like composition would do just as well.