why .net does not support multiple inheritance?

Answer Posted / satish kumar k

In object-oriented programming languages with multiple
inheritance and knowledge organization, the diamond problem
is an ambiguity that arises when two classes B and C inherit
from 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?
For example, in the context of GUI software development, a
class Button may inherit from both classes Rectangle (for
appearance) and MouseEvent (for functionality), and classes
Rectangle and MouseEvent both inherit from the Object class.
Now if the equals method is called for a Button object and
there is no such method in the Button class but there is an
over-ridden equals method in both Rectangle and MouseEvent,
which method should be eventually called?

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Elements of CAS

1752


How to implement datagrid in.net? How would you make a combo-box appear in one column of a datagrid? What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for datagrid methods. What is the access specifier used for that methods in the code behind file and why?

550


What is the difference between odbc and ado?

544


What is the difference between an abstract class and an interface?

509


What is jit compilers?

578






What is the difference between .net and laravel?

575


Explain how to spawn a thread?

541


Explain asp.net?

614


Compare & contrast rich client (smart clients or windows-based) & browser-based web application

540


Do you know what is linq?

588


What is COM Interoperability in .NET

645


Explain the difference between asp.net and asp?

567


What is the difference between boxing and unboxing?

546


A developer company sends dlls to the client. Some client is not happy current functionality, so request some modification. Developer made some changes and send new dll to all clients. Some client is happy with old version, tell me minimal change to so that neither clients get affected?

513


What is immutability?

571