Abstract Class

Abstract classes are classes that cannot be instantiated and are partially implemented or not implemented. Members that are implemented can still be overridden in the implementation class. A class can only inherit only one abstract class or any other type of class. Abstract classes provide elements of inheritance and interface.


Interfaces are definitions how a class needs to respond. An interface describes methods, properties (applicable to Visual Basic .Net) and events that a class needs to implement and type of parameters each member receive and return, but leaves the specific implementation of these members up to the implementing classes. A class may implement more then one interface.

The choice of whether to design an abstract class or an interface sometimes can be difficult. Both interface and abstract class is useful for component integration. Some points that help you to whether to choose an abstract class or interface

  1. If you are creating multiple versions of component then use abstract class. By updating the base class all the inheriting classes are automatically updated with changes. Interfaces cannot be changed once they are created. If new version of interface is required, you must create a new version of interface.
  3. Abstract classes should be use for primarily for objects that are closely related whereas interfaces are used where common functionality is required to unrelated classes.