In The C# Programming Language Krzysztof Cwalina states in an annotation:
we explicitly decided not to add support for multiple inheritance [...] th
I think you should read what Eric Lippert says about Interfaces . He has got his hands dirty so I think he knows better than every one else.
Sometimes there are worse cases and worst cases. You have to choose the less bad one.
Below is a copy of the linked post:
They are there just to make sure that the said functions (in the interface) are implemented in the inheriting class.
Correct. That's a sufficiently awesome benefit to justify the feature. As others have said, an interface is a contractual obligation to implement certain methods, properties and events. The compelling benefit of a statically typed language is that the compiler can verify that a contract which your code relies upon is actually met.
That said, interfaces are a fairly weak way to represent contractual obligations. If you want a stronger and more flexible way to represent contractual obligations, look into the Code Contracts feature that shipped with the last version of Visual Studio.
C# is a great language, but sometime it gives you the feeling that first Microsoft creates the problem(not allowing multiple inheritance) and then provides the solution, which is rather a tedious one.
Well I'm glad you like it.
All complex software designs are a result of weighing conflicting features against each other, and trying to find the "sweet spot" that gives large benefits for small costs. We've learned through painful experience that languages that permit multiple inheritance for the purposes of implementation sharing have relatively small benefits and relatively large costs. Permitting multiple inheritance only on interfaces, which do not share implementation details, gives many of the benefits of multiple inheritance without most of the costs.