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
How many types of generations are there in a garbage collector?
Can a dll be changed to an exe?
what is prototype design pattern in .net
Tell us the differences between an interface and an abstract class in .net?
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?
What is a windows process in .net?
I have a problem in installing visual Studio 2008 on PC that have Celeron Processor ? afterAll InstallionFaied . Pls suggest me . Is it possible or not .if Yes then How ?
Explain about .Net products?
Tell me about secure socket layer? How to make use of the technology?
What is the use com component in .net?
What is garbage collection and how it works ?
What are data types in .NET?
What are the properties of ADO.NET?
Please explain what garbage collection is and how it works. Provide a code example of how you can enforce garbage collection in .net?
Explain what inheritance is, and why it's important?