コード例 #1
0
ファイル: Mammal.cs プロジェクト: tarekalzein/ApuAnimalHotel
 //Not userd - Constructor to copy  object.
 public Mammal(Mammal other)
 {
     this.Name       = other.Name;
     this.Age        = other.Age;
     this.Category   = other.Category;
     this.Gender     = other.Gender;
     this.TeethCount = other.TeethCount;
     Category        = CategoryType.Mammal;
 }
コード例 #2
0
ファイル: Cat.cs プロジェクト: tarekalzein/ApuAnimalHotel
 //Not used - Constructor copier that takes another mammal and copy properties to dog object
 public Cat(Mammal other)
 {
     this.Name       = other.Name;
     this.Age        = other.Age;
     this.Category   = other.Category;
     this.Gender     = other.Gender;
     this.TeethCount = other.TeethCount;
     this.breed      = Breed;
     this.Id         = other.Id;
 }