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 anonymous method is different from a lambda expression?
What is STA in .NET?
what are connection strings?
What is RCW (Run time Callable Wrappers)?
How do you instantiate a complex number?
Write the .net syntax for 'for loop'?
How to produce an assembly?
Explain the difference between managed and unmanaged code?
How do we access crystal reports in .net?
What is the advantage of .net?
What is the microsoft .net?
How viewstate is being formed and how it's stored on client in .net?
Why inheritance is important?
Explain what is the difference between response.redirect & server.transfer?
Explain what is immutability, what is it for and how is it codified?