public void FeedGroup() { var animalgroup = AllAnimals.Where(animal => animal.Type == SelctFeedType); foreach (Animal animal in animalgroup) { animal.Eat(); } }
public bool IsAbleToFeedGroup() { if (HasAnimals()) { if (AllAnimals.Where(ani => ani.Type == SelctFeedType).Any()) { return(true); } } return(false); }