What is diamond of death in OOPS?

 Posted by Niladri.Biswas on 7/30/2012 | Category: C# Interview questions | Views: 3549 | Points: 40

Its an ambiguity arises when two class inherits the same base class and one more class inherits these two classes. If class Derived A and class Derived B inherits class BaseClass where BaseMethod() is a method and class Derived C inherits class Derived A and class Derived B and override the method BaseMethod() , then there will be a confusion for class Derived C to inherit the method BaseMethod(). The confusion is from which class it will inherit. It is the diamond of death in OOPS jargon.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response