February 26, 2015
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.
- An abstract class can have implementation of all of its members except abstract members, but an interface can only have declaration, no implementation.
- 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.
- An abstract class can have fields, but an interface cannot have fields.
- An interface can inherit from another interface only, but an abstract can inherit from an interface as well as another abstract class.