示例#1
0
 public Dog(string name, int age, double length, Collar collar)
 {
     this.name = name;
     this.age = age;
     this.length = length;
     this.collar = collar;
 }
示例#2
0
 //two params
 public Dog(string name, int age)
 {
     this.name = name;
     this.age = age;
     this.length = 0.3;
     this.collar = new Collar();
 }
示例#3
0
 //three params
 public Dog(string name, int age, double lenght)
 {
     this.name = name;
     this.age = age;
     this.length = lenght;
     this.collar = new Collar();
 }
示例#4
0
 //no parameters
 public Dog()
 {
     this.name = "Sharo";
     this.age = 1;
     this.length = 0.3;
     this.collar = new Collar();
 }