Junior OOP

What is the key difference between abstract classes and interfaces?

Feature Abstract Class Interface

Implementation Can have full/partial

implementation

Cannot have full implementation (except

default methods in C# 8+)

Fields Can have fields Cannot have fields

Inheritance Single class inheritance Multiple interface inheritance allowed

Constructors Allowed Not allowed

Access

Modifiers

Can have public,

protected, private

Members are public by default

More from C# Programming Tutorial

All questions for this course