个人理解:就是用子类对象去实列化父类的对象;
1.可以调用父类拥有的方法

1.可以调用父类拥有的方法
2.如果父类的方法是虚方法并且被父类重写,那么就可以用父类的对象间接的引用到父类的的方法;
lass Program
{
class father
{
public void Show()
{
Console.WriteLine("我是父类没有虚方法的");
}
public virtual void vShow()
{
Console.WriteLine("我是父类里面有虚方法的");
}
}
class zhulang:father
{
public void Show()
{
Console.WriteLine("我是子类直接被继承的");
}
}
class zhutao:father
{
public override void vShow()
{
Console.WriteLine("我是子类方法被重写了的");
base.vShow();
}
}
static void Main(string[] args)
{
father oper = new zhulang ();
oper .Show ();
oper = new zhutao ();
oper .vShow ();
Console .ReadKey ();
}
}