public Meal[] getMeals() { int i = 0; Meal[] mealsInOrder = new Meal[ meals.Count ]; foreach( Meal m in meals) { mealsInOrder[i] = m; i++; } return mealsInOrder; }
// Public Methods public string addMealToOrder(Meal meal) { try { meals.Add(meal); return "Meal Added"; } catch (Exception ex) { return ex.Message; } }