Пример #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();
 }