private double GetTotalMeal() { List <Meal> mealList = aMealManager.GetMealList(); double totalMeal = 0; foreach (var meal in mealList) { totalMeal = totalMeal + meal.TotalMeal; } return(totalMeal); }
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); }