摘要: 以继承为基础,继承举例:publicclassPerson{publicvoidSayhello(){Console.WriteLine("Hello,Iamaperson");}}publicclassStudent:Person{}Student类继承与Person类我们想改变Student里面继承Person的SayHello()方法,使其具有自己的特性.这里使用new关键字.publicclassPerson{publicvoidSayHello(){Console.WriteLine("Hello,Iamaperson");}}publiccl 阅读全文
posted @ 2004-07-27 23:10 cacard 阅读(1535) 评论(1) 推荐(0) 编辑