Click here to Skip to main content
15,887,442 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
Why C#.net does not support multiple inheritance?why it can support by interface?why not by class?
Posted

Because the designers decided they'd cripple the language in the interests of making it "safer". X|

Implementing an interface is unrelated to inheritence.
 
Share this answer
 
C# and Java languages don't support multiple inheritance because of the diamond problem[^].

Here is the short summary:
The diamond problem is an ambiguity that arises when two classes B and C inherit from A, and class D inherits from both B and C. If a method in D calls a method defined in A (and does not override the method), and B and C have overridden that method differently, then from which class does it inherit: B, or C?


 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900