Esempio n. 1
0
 private void CheckAndUpdateLabelIfPrime(string number)
 {
     if (Demo42Prime.IsPrime(Convert.ToInt32(number)))
     {
         litResults.Text = number + " is prime";
     }
     else
     {
         litResults.Text = number + " is not prime";
     }
 }
Esempio n. 2
0
 protected void btnChkPrime2_Click(object sender, EventArgs e)
 {
     if (Demo42Prime.IsPrime(Convert.ToInt32(txtNumber1.Text)))
     {
         lblResults.Text = txtNumber2.Text + " is prime.";
     }
     else
     {
         lblResults.Text = txtNumber2.Text + " is not prime.";
     }
 }