Mid From PDF OOP C# OOP

Can you instantiate an abstract class?

  • No, abstract classes cannot be instantiated directly.
  • Must be inherited by a derived class which implements abstract methods.

bstract class Shape { public abstract void Draw(); }

// Shape s = new Shape(); // Not allowed
class Circle : Shape { public override void Draw() =>

Console.WriteLine("Circle"); }

More from C# Programming Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details