Answers for "virtual methods c#"

C#
0

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");
}
}
Posted by: Guest on May-26-2021

C# Answers by Framework

Browse Popular Code Answers by Language