C Sharp (C#) - Polymorphism and Abstract Classes
What will be the output of this code?
abstract class Shape {
public abstract string Name();
}
class Circle : Shape {
public override string Name() => "Circle";
}
class Program {
static void Main() {
Shape s = new Circle();
System.Console.WriteLine(s.Name());
}
}