Solved

why multiple inheritance is not supported in .Net

Posted on 2008-10-27
3
793 Views
Last Modified: 2013-12-17
why multiple inheritance is not supported in .Net
0
Comment
Question by:winsoftech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

752 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