最赞回答 / 眉眉眉
class Pet { interface Iclimbtree { void climbtree(); } interface Icatchmice { void catchmice(); } public Pet(string name) { Name = name; } protected string Name; virtual public void printf() { Console.WriteLine(Name); } public clas...
2019-06-23
最赞回答 / 慕慕0266592
public Dog(string name).base(name)这句话可以理解成,派生类构造函数的参数传进来,丢给base(),基类构造函数拿到这个参数,进行构造;所以不能不写
2019-04-28