This blog defines the Working of Polymorphism.
In This multi level inheritance also used.
Definition of class A
public class A
{
public void Print()
{
Console.WriteLine("Printing A");
}
public virtual void Write()
{
Console.WriteLine("Writing A");
}
}
Class B is inherited from class A, defined as follows
public class B : A
{
public void Print()
{
Console.WriteLine("Printing B");
}
public override void Write()
{
Console.WriteLine("Writing B");
}
}
Similarly Class c is inherited from class A
Class D is inherited from class A
public class D:C
{


Join the conversation! Your thoughts help the community grow.