LogiQuest
Back to Inheritance
4

What is the output of the following program?

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

Discussion (0)

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

Log in to join the discussion.