abstract class A
{
public virtual void Method1()
{
Console.WriteLine ("A.Method1");
}
public abstract void Method2();
}
class B:A
{
public override void Method1()
{
Console.WriteLine("B.Method1");
}
}
class Program
{
public static void Main(string[] args)
{
A a = new B();
a.Method1();
}
}
Login in to like
Login in to comment