Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("*** Welcome to Housework Simulator! ***");
            var housework = CleanAllTheThings();

            try {
                housework.Wait();
            } catch (AggregateException aex) {
                Console.WriteLine("You're in trouble now...");
                foreach (var ex in aex.Flatten().InnerExceptions)
                {
                    Console.WriteLine(ex.Message);
                }
            } catch (Exception ex) {
                Console.WriteLine(ex);
            }
            sim.Log("The housework took {0} hrs {1} mins today. Yay.", sim.ElapsedTime.Hours, sim.ElapsedTime.Minutes);
            Relax();
        }
Exemplo n.º 2
0
 private static void Main(string[] args)
 {
     Console.WriteLine("*** Welcome to Housework Simulator! ***");
     CleanAllTheThings().Wait();
     sim.Log("The housework took {0} hrs {1} mins today. Yay.", sim.ElapsedTime.Hours, sim.ElapsedTime.Minutes);
     Relax();
 }