When is it mandatory to declare a class as abstract?

by Adrian on September 4, 2009

A class must be declared abstract if it contains variant functionality. Variant functionality is functionality that is defined in a base class but implemented in a derived (or child) class. This is indicated by using the C# ‘abstract’ keyword (or in VB.NET, the ‘MustOverride’ keyword) before a method or property name.

Abstract classes cannot be instantiated themselves since they do not provide a complete implementation all their functionality. They are very useful when a base class needs to provide both invariant and variant functionality.

Previous post:

Next post: