示例#1
0
 public Meal[] getMeals()
 {
     int i = 0;
     Meal[] mealsInOrder = new Meal[ meals.Count ];
     foreach( Meal m in meals)
     {
         mealsInOrder[i] = m;
         i++;
     }
     return mealsInOrder;
 }
示例#2
0
        // Public Methods
        public string addMealToOrder(Meal meal)
        {
            try
            {
                meals.Add(meal);
                return "Meal Added";
            }

            catch (Exception ex)
            {
                return ex.Message;
            }
        }