c# virtual code example
Example: virtual methods c#
public class Base
{
public virtual void Test()
{
Console.WriteLine("This is the base version of the virtual method");
}
}
public class Derived : Base
{
public override void Test()
{
Console.WriteLine("This is the derived version of the virtual method");
}
}