Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Why not support multiple inheritance in .Net ?

user-image
Question added by Jamil Akhtar , Senior Software engineer , Optimization Software Technology
Date Posted: 2014/02/02
Rameez Ahmed Sayad
by 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
by 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

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.