Esempio n. 1
0
 private void TestGenerateExcuses(object sender, RoutedEventArgs e)
 {
     for (int i = 0; i < 100; i++)
     {
         Console.WriteLine(NamesGenerator.GenerateName() + " didn't go hunting. He told others that " + NamesGenerator.GenerateLameExcuse());
     }
 }
Esempio n. 2
0
        private void TestGenerateNames(object sender, RoutedEventArgs e)
        {
            DateTime start = DateTime.Now;

            for (int i = 1; i < 10000001; i++)
            {
                string name = NamesGenerator.GenerateName();

                if (i % 500000 == 0)
                {
                    Console.WriteLine(i + ".\t" + name + "\t" + (DateTime.Now - start).TotalMilliseconds);
                    start = DateTime.Now;
                }
            }
        }