Junior OOP

What is the difference between interface-based and abstract class-based abstraction?

Feature Abstract Class Interface

Methods Can have abstract +

concrete methods

Only abstract methods (C# 8+ allows default

implementation)

Fields Can have fields Cannot have fields

Inheritance Single inheritance Multiple interfaces can be implemented

Constructo

Can have constructors Cannot have constructors

More from C# Programming Tutorial

All questions for this course