Quiz · Inheritance and interfaces · lesson 5 of 10
Quiz — override and new
Question 1 of 2
What does the program print?
Vehicle v = new Taxi();
Console.WriteLine(v.Who());
class Vehicle { public virtual string Who() => "V"; }
class Car : Vehicle { public override string Who() => "C"; }
class Taxi : Car
{
public override string Who() => "T" + base.Who();
}