class Parent
{
public void Print()
{
Console.WriteLine(this.GetType());
}
}
class Child : Parent
{
}
class Program
{
static void Main(string[] args)
{
Child c = new Child();
c.Print();
}
}
输入结果: