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;}写这段代码有什么作用
- 1 回答
- 0 关注
- 532 浏览
添加回答
举报
0/150
提交
取消