本文共 898 字,大约阅读时间需要 2 分钟。
ylbtech- .NET-Basic: A.4.1-类的继承(implement) |
A.4.1-类的继承(implement)
1.A,源代码 |
using System;namespace 继承{ class Program { static void Main(string[] args) { //实例化对象 //多行注释/* */ /* //1 Person p = new Person(); p.Show(); */ /* //2 Person p = new Person(2000, "yuanbo", "男"); p.Show(); * */ /* //3 Student s = new Student(); s.Show(); * */ /* //4 Student s = new Student(2000, "mike", "男", "3期"); s.Show(); * */ Console.ReadLine(); } }}