예제 #1
0
 public void AddFood(Food food)
 {
     if (!food.GetType().IsInstanceOfType(typeof (NullFood)))
         FoodItems.Add(food);
 }
예제 #2
0
 public void RemoveFood(Food food)
 {
     if (FoodItems.Contains(food))
         FoodItems.Remove(food);
 }