private void Calcularbutton_Click(object sender, EventArgs e) { int num = Convert.ToInt32(NumerotextBox.Text); int factorial = 1; for (int i = 1; i <= num; i++) { factorial *= i; } ResultadotextBox.AppendText(factorial.ToString()); Debug.WriteLine(factorial.ToString()); }
private void CalcularButton_Click(object sender, EventArgs e) { if (!Validar()) { return; } Poligonos poligonos = new Poligonos ( lados: Convert.ToSingle(LadosTextBox.Text), apotema2: Convert.ToSingle(ApotematextBox.Text) ); ResultadotextBox.AppendText(Convert.ToString(poligonos.TOString()) + "\t"); Limpiar(); }