public readonly List <CafeMenuContent> _CafeMenu = new List <CafeMenuContent>(); //Creating the menu (list) and naming it _CafeMenu. public bool AddMealToMenu(CafeMenuContent meal) //Method to verify that a meal was added to the menu. { int startingCount = _CafeMenu.Count; //Reading the intial count... _CafeMenu.Add(meal); //Adding the meal... bool wasAddedd = (_CafeMenu.Count > startingCount) ? true : false; //Asking if the new count is greater than the original count... return(wasAddedd); //Returning the value. }
public bool DeleteMeal(CafeMenuContent existingMeal) { bool deleteMeal = _CafeMenu.Remove(existingMeal); return(deleteMeal); }