Modifier: abstract
Used to declare an incomplete implementation of a class, method, property, indexer or event.
By declaring a class abstract, it can be used as a template when creating other classes. In the example below, the abstract class A forces any classes that are derived from it to include a ‘Test’ method. Failure to include the Test method will result in an error when compiling.
Example:
abstract class A
{
public abstract void Test();
}
class B : A
{
public override void Test()
{
}
}



Leave a comment