Answer:
To provide a specialized implementation in a class, we can mark the member function name as virtual which can be overridden in the subclasses. We can declare methods, indexers, events, and properties as virtual in a class.
It implements the concept of polymorphism. If a class that overrides the virtual method then it has to use the override keyword.
Asked In: Many Interviews |
Alert Moderator