这个作业对于理解C#的多态十分重要,
不能代写
不能代写
解决方案 »
- Asynchronous Client Socket和SocketAsyncEventArgs的使用问题
- 关于C#正则表达式:运行后eachEntryList1.Count的值为啥是0?
- 控件引用,导致应用无响应
- 降低要求:怎样实现自动从Email附件(Excel文件)中获得数据??? (给200分)
- 怎样把按钮上的焦点提示虚线框杀死,我去不掉,下去,去,去..
- 怎样对矩形设置透明颜色?谢谢大家了!
- 关于window.open()的用法
- 如何自已做Windows资源管理器(关键是如何获取桌面.我的电脑的图标)
- 初来乍到,请各位高手推荐基本好书or网站。(发表有分)
- 发布公告1:北京、C#、企业应用,有谁想兼职?
- gridview问题,高手请进!
- 手机模拟器控制电脑ppt播放
class Program
{ public abstract class car
{ public int wheel;
public double height;
public car(int wheel, double height)
{
this.wheel = wheel;
this.height = height;
}
public abstract void speak();
} class bus:car
{
public int people;
public int a;
public int b;
public bus(int wheel,double height,int people)
:base(wheel,height)
{ this.wheel = wheel;
this.height = height;
this.people = people;
} public override void speak()
{
Console.WriteLine("bus虚方法吧!");
}
} static void Main(string[] args)
{ mydelete a = () =>
{
car[] op = new car[1] { new bus(4,23.2,30)};
for (int i = 0; i < 1; i++)
{
op[i].speak();
}
};
a();
Console.ReadKey();