namespace Test
{
class TypeA
{
class TypeB:TypeA
{
public override void MethodA() {
Console.WriteLine("TypeB"); }
}
public virtual void MethodA() { Console.WriteLine("TypeA"); }
}
class Prоgrаm
{
static void Main(string[] args)
{
TypeA a = new TypeA();
TypeB b = new TypeB();
a.MethodA();
b.MethodA();
Console.ReadLine();
}
}
}
Login in to like
Login in to comment