What is the difference between the Virtual method and the Abstract method?

1 Answers

Rahul Roi
Rahul Roi

Where the Virtual method must always have a default implementation. Although, this can be overridden in the derived class, however, it is not mandatory. This can be overridden using the override keyword.

Where an Abstract method does not have any implementation. This resides in the abstract class. This is mandatory that the derived class implements the abstract method. The override keyword is not necessary here though it can be used.

Answer