private void primeNumber_Click(object sender, RoutedEventArgs e) { int n = Int32.Parse(inputTextBox.Text); resultLabel.Text = PrimeNumbers.FindPrimeNumbersSync(n).ToString();; }
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(); }
public static void Thread2() { Console.WriteLine("Thread2 {0}", PrimeNumbers.FindPrimeNumbersSync(400000)); }