Summary
This chapter introduced you to abstract functions, polymorphism and interfaces. A review of the important points in this chapter follows.
An abstract method consists of a method header but has no method body and, therefore, no implementation. Properties and indexers can also be declared abstract.
A class with one or more abstract functions must itself be declared abstract. An abstract class can contain non-abstract function members.
An abstract class cannot be instantiated.
A class derived from an abstract class must provide implementations for all the abstract methods contained in this base class; otherwise, it also becomes abstract. abstract functions are implicitly virtual, so providing an implementation for an inherited abstract
Get C# Primer Plus now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.