Virtual Method

A method that child classes are allowed to override.

What is Virtual Method?

A virtual method is a method a child class is allowed to override. In C#, methods can only be overridden if they are marked virtual (or abstract). In Java, methods are overridable by default.

public class Notification
{
    public virtual void Send() => Console.WriteLine("Sending...");
}

Level: Journeyman · More OOP terms at this level

Updated

In other subjects