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