6
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following program?
var c = new C();
Console.WriteLine(c.Describe());
class P { public virtual string Describe() => "P"; }
class C : P { public override string Describe() => base.Describe() + "C"; }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"; }