Пример #1
0
        private double GetTotalMeal()
        {
            List <Meal> mealList  = aMealManager.GetMealList();
            double      totalMeal = 0;

            foreach (var meal in mealList)
            {
                totalMeal = totalMeal + meal.TotalMeal;
            }
            return(totalMeal);
        }
Пример #2
0
        double GeTotalMeal()
        {
            MealManager aMealManager = new MealManager();
            List <Meal> meals        = aMealManager.GetMealList();

            double totalMeal = 0;

            foreach (var meal in meals)
            {
                totalMeal = (totalMeal + meal.TotalMeal);
            }
            return(totalMeal);
        }