private void button2_Click(object sender, EventArgs e) { int.TryParse(textBox1.Text, out int input); int.TryParse(textBox2.Text, out int count); MessageBox.Show(textBox1.Text + "의" + textBox2.Text + " 곱은" + Mymath.power(input, count)); }
private void button1_Click(object sender, EventArgs e) { int.TryParse(textBox1.Text, out int input); Mymath m = new Mymath(); MessageBox.Show(textBox1.Text + "의 제곱은" + m.power(input)); }