1.2:多态与重写.pdf
重写,子类override,父类virtual, 用数组输出两个show,多态 Person[] persons = new Person[2]; Student stu = new Student("aaa", 20, true); Teacher t = new Teacher("aa", 12, false); persons[0] = stu; persons[1] = t; for (int i = 0; i < persons.Length
下载地址
用户评论