LogiQuest
Back to Inheritance
3

What is the output of the following program?

A obj = new B(); Console.WriteLine(obj.Who());
class A { public virtual string Who() => "A"; }
class B : A { public override string Who() => "B"; }
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.