Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Why not support multiple inheritance in .Net ?

user-image
Question ajoutée par Jamil Akhtar , Senior Software engineer , Optimization Software Technology
Date de publication: 2014/02/02
Rameez Ahmed Sayad
par Rameez Ahmed Sayad , .Net Consultant , Proximus Luxembourg

To be honest , I don't even see a true need for object inheritance ( is a relationship ) , We can convert is a relation to 'has a' relation .  Multiple interfaces make much more sense to me which is present in c# .

amer safi
par amer safi , Technical Team Leader( MCPD,MCTS) , LKD

To understand that you need to understand the Diamond problem first:The Diamond problem is an ambiguity that arises when two classes B and C inherit from Class 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?That is the reason why C# and Java languages does not support multiple inheritance.

More Questions Like This