Difference Between Abstract Class & Interface in C#

Difference Between Abstract Class & Interface in C#
Rating: 5 - 1 Votes

Difference Between Abstract Class & Interface in C#

Difference Between Abstract Class & Interface in C#

Difference Between Abstract Class & Interface in C#

The only one common thing between abstract class and interface is that you cannot create instance of any of them because both of them are incomplete.  There are also few differences between an abstract class and an interface.

  1. An abstract class can have implementation of all of its members except abstract members, but an interface can only have declaration, no implementation.
  2. An abstract class members can have different type of access modifiers, but an interface members are public by default and using any other access modifier is not allowed.
  3. An abstract class can have fields, but an interface cannot have fields.
  4. An interface can inherit from another interface only, but an abstract can inherit from an interface as well as another abstract class.