Solved

why multiple inheritance is not supported in .Net

Posted on 2008-10-27
3
790 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

810 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