void MethodCallOneOperand(string operation, TextBox res) { switch (operation) { case "sin": res.Text = calculator.Sinus(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "cos": res.Text = calculator.Cosinus(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "tan": res.Text = calculator.Tangens(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "ctan": res.Text = calculator.Cotangens(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "ln": res.Text = calculator.NaturalLogarithm(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "invers": res.Text = calculator.InverseNumber(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "sqr": res.Text = calculator.Sqrt(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "squar": res.Text = calculator.Squaring(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; case "factorial": res.Text = calculator.Factorial(Convert.ToDouble(textBox_lastarg_or_answer.Text)).ToString(); break; default: break; } }