日期:2014-05-17 浏览次数:21032 次
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CLR_TEST1
{
public class BaseClass
{
public virtual void Print()
{
Console.WriteLine(this.GetType().FullName);
Console.WriteLine("BaseClass Print");
}
}
public class DirClass : BaseClass
{
public override void Print()
{
base.Print();
Console.WriteLine(base.GetType().FullName);
Console.WriteLine("DirClass Print");
}
}
class Program
{
static void Main(string[] args)
{
DirClass b = new DirClass();
b.Print();
Console.Read();
}
}
}