예제 #1
0
        private void primeNumber_Click(object sender, RoutedEventArgs e)
        {
            int n = Int32.Parse(inputTextBox.Text);


            resultLabel.Text = PrimeNumbers.FindPrimeNumbersSync(n).ToString();;
        }
예제 #2
0
        public static void Main(string[] args)
        {
            //Synchronous
            Console.WriteLine(DateTime.Now);

            var task = PrimeNumbers.FindPrimeNumbersSync(250000);

            Console.WriteLine(task);

            Console.WriteLine(DateTime.Now);

            var task1 = PrimeNumbers.FindPrimeNumbersSync(400000);

            Console.WriteLine(task1);

            Console.WriteLine(DateTime.Now);

            Console.ReadKey();
        }
예제 #3
0
 public static void Thread2()
 {
     Console.WriteLine("Thread2 {0}", PrimeNumbers.FindPrimeNumbersSync(400000));
 }