Solved

why multiple inheritance is not supported in .Net

Posted on 2008-10-27
3
787 Views
Last Modified: 2013-12-17
why multiple inheritance is not supported in .Net
0
Comment
Question by:winsoftech
3 Comments
 
LVL 16

Accepted Solution

by:
Gyanendra Singh earned 125 total points
ID: 22819242
There is no definitive answer to this question. It is a matter of taste.

There is the classic diamond problem encountered in multiple inheritance, in which class D inherits from both B and C, which both inherit from A.

  A
 / \
B   C
 \ /
  D

So which copy of A does D get? The one from B, the one from C? Both? This way various languages resolve this problems is discussed here:

http://en.wikipedia.org/wiki/Diamond_problem

It is informative, if a bit dizzying, to read the last sentence in the explanation of the way C++ resolves this issue.

Here is an interesting discussion of this topic:

http://www.artima.com/intv/dotnet.html

Search on "Multiple Inheritance" in this discussion to hear Anders discuss this subject:

http://msdn.microsoft.com/msdntv/transcripts/20040624csharpahTranscript.aspx
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A list of useful business intelligence software.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now