using System.Collections.Generic;
public static List<Food> shoppingList = new List<Food>();
public static void Main()
string selection = string.Empty;
Console.WriteLine("1: Enter a food");
Console.WriteLine("2: Show a list of entered food ");
Console.WriteLine("3: Exit");
selection = Console.ReadLine();
else if(selection == "2")
else if(selection != "3")
Console.WriteLine("You've been a bad boy. Please make a valid selection.");
Console.WriteLine("Thank you for using the 'F00D Sh0pping List' program. have a nice day ;)");
public static void GetFood()
Console.WriteLine(" Enter a food name:");
string name = Console.ReadLine();
Console.WriteLine(" Enter the quantity of '{0}':" ,name);
int quantity = Convert.ToInt32(Console.ReadLine());
Food randomFood = new Food();
randomFood.Quantity = quantity;
shoppingList.Add(randomFood);
public static void ShowShoppingList()
Console.WriteLine(" ___________________________");
Console.WriteLine(" ###### Shopping List ######");
Console.WriteLine(" ___________________________");
foreach(Food currentFood in shoppingList)
Console.WriteLine(" Name: {0} Quantity: {1}",currentFood.Name, currentFood.Quantity);