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

What is .net environment?

554


Can you explain what do you understand about web service?

613


Which namespace does it belong to by default?

573


Can any object be stored in a viewstate in .net?

609


Explain when should you use .net web forms over asp.net mvc?

519






What do you mean by Code Access Security in .NET?

640


Is there built-in support for logging?

620


Is Driver Script any how related to AOM?

621


What is meant by managed and unmanaged code?

604


What does jit do?

571


Explain what is a manifest in .net?

572


What is the use of activex control in .net?

592


What is multiThreading in .NET?

595


Is there built-in support for tracing?

584


What does il do?

568