示例#1
0
 public static void ServedBreakFood(Toast toast, Bacon bacon, Coffie coffie, Eggs eggs)
 {
     if (toast.IsFried && toast.Jammed && toast.Buttered && coffie.IsInCup && eggs.IsFried && bacon.IsFried)
     {
         Console.WriteLine("morgenmad serveret");
     }
     else
     {
         Console.WriteLine("kunne ikke serveres noget er gået galt");
     }
 }
示例#2
0
        public static async Task <Eggs> MakeEggs(int amount)
        {
            for (int i = 0; i < amount; i++)
            {
                Console.WriteLine("Steger æg");
            }

            await Task.Delay(2000);

            Console.WriteLine("æg klar");
            Eggs eggs = new Eggs();

            eggs.IsFried = true;
            return(eggs);
        }