C Sharp (C#) - Polymorphism and Abstract Classes
What will be the output of this code?
class Base {
public virtual string Show() => "Base";
}
class Derived : Base {
public new string Show() => "Derived";
}
class Program {
static void Main() {
Base obj = new Derived();
System.Console.WriteLine(obj.Show());
}
}