This is Cause by diamond Shape problems of two classes. If 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 it), and B and C have overridden that method differently, then via which class does it inherit: B, or C? It creates ambiguity and Simply, it will increase the complexity. So., multiple inheritance is not possible in C#. that is called Diamond Problem. But., in C# we can solve the Diamond problem with the help of interfaces in some cases.
Asked In: Many Interviews |