What is the difference between abstract class and interface?

Mid C#

Answer

Abstract class: Can contain both implementation and abstraction.

Interface: Defines only the contract with no implementation (in traditional C#).

A class can inherit one abstract class but implement multiple interfaces.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice