Exemple #1
0
        static void Main(string[] args)
        {
            Donut  donut       = loadDonuts();
            string userService = GetUserDonut(donut);

            Console.WriteLine($"{userService}, awesome!");
        }
Exemple #2
0
 static string GetUserDonut(Donut donut)
 {
     foreach (var topping in donut.Topping)
     {
         Console.WriteLine("Here is a list of toppings that you can chose from: ");
         Console.WriteLine(topping);
         return(topping);
     }
     foreach (var flavor in donut.Flavor)
     {
         Console.WriteLine("Here is a list of flavors that you can chose from: ");
         Console.WriteLine(flavor);
         return(flavor);
     }
     return("oof");
 }