What is the Difference Between an Interface and an Abstract Class

 

Abstract Class

Interface

1

Abstract Class can contains fields, static members, constants, Readonly, Virtual members.

Interface cannot contains fields, static members, constants, Readonly, Virtual members.

2

Abstract Class can contain zero or more abstract methods

Interface should contain at least  one abstract method.

3

Abstract Class can contain zero or more Non abstract methods.

Interface cannot contain Non abstract methods.

4

By default Access modifiers are private.

By default Access modifiers are Public.

5

Once you created abstract method in Base Class , that method should implemented in derived class by using Override keyword.

Once you created abstract method in Interface, that method should implemented in derived class without using Override keyword.

6

Abstract class can contains Constructors.

Interface cannot contains Constructors.

Ebook Download
View all
Learn
View all