private void turetmeButonu_Click(object sender, EventArgs e) { TablorichTextBox.Clear(); float numara = 0f; if (numaraTextBox.Text.Trim() == string.Empty) { MessageBox.Show("Lütfen herhangi bir sayı giriniz...", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } try { numara = Convert.ToSingle(numaraTextBox.Text); } catch { MessageBox.Show("Geçersiz sayı...", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } for (int i = 1; i <= 10; i++) { TablorichTextBox.Text += numara + " * " + i + " = " + numara * i + " \n "; } }
private void sifirlaButonu_Click(object sender, EventArgs e) { TablorichTextBox.Clear(); numaraTextBox.Clear(); numaraTextBox.Focus(); }