134.
Choose the best answer below of what the code best describes:
public class DrawingObject
{
public virtual void Draw()
{
Console.WriteLine("I'm just a generic drawing object.");
}
}
public class Line : DrawingObject
{
public override void Draw()
{
Console.WriteLine("I'm a Line.");
}
}
public class Circle : DrawingObject
{
public override void Draw()
{
Console.WriteLine("I'm a Circle.");
}
}
public class DrawDemo
{
public static void Main()
{
DrawingObject draw= new Circle();
draw.Draw();
}
}
View Description
Polymorphism allows you to invoke derived class methods through a base class reference during run-time