class animal
{
public animal(){};
private string name;
public animal ( string name)
{
this.name=name;
}
public virtual void show()
{
console.writeln("我叫:{0}",name);
}
}
class people:animal
{
protected animal an;
punlic void decorate(animal an )
{
this.an=an;
}
public override void show()
{
.........
}
}
我不太明白
protected animal an;
punlic void decorate(animal an )
{
this.an=an;
}
写这段代码有什么作用
慕尼黑5688855
相关分类