Example #1
0
 public void Execute()
 {
     if (_animals.GetAnimals().Count > 0)
     {
         IAnimal animalToRemove = _animals.GetAnimals().First(a => a.GetName() == _name);
         _animals.Remove(animalToRemove);
     }
 }
Example #2
0
 public void Remove(IAnimal animal) => Animals.Remove(animal);