示例#1
0
        private void OnClick(object sender, RoutedEventArgs e)
        {
            int    number = int.Parse(txtNumber.Text);
            string result = string.Join("*", PrimeHelper.GetPrimeFactors(number));

            lblResult.Content = result;
        }
示例#2
0
        private Task <string> FactorAsync()
        {
            int number = int.Parse(txtNumber.Text);

            return(Task.Factory.StartNew <string>(() =>
                                                  string.Join("*", PrimeHelper.GetPrimeFactors(number))
                                                  ));
        }