//Delete public bool RemoveMealsFromMenu(int mealNumber) { Meals mealToDelete = GetMealByNumber(mealNumber); if (mealToDelete == null) { return(false); } //menuC is a check to see if it deleted it and if the number is greater than the number deleted //it will return true because that means that it has carried out the function (True) int menuC = _meals.Count; //.remove (???) ? has to have an object inside. _meals.Remove(mealToDelete); if (menuC > _meals.Count) { return(true); } else { return(false); } }
//CRUD //Create Meals // Atif once all Challenges are done please rename "Content". public void AddMealsToList(Meals content) { _meals.Add(content); }