private void btnGo_Click(object sender, EventArgs e) { try { RestOfTheProgram.FunctionWith1Param(operation1, Double.Parse(textBoxDef1.Text)); RestOfTheProgram.FunctionWith2Params(operation2, Double.Parse(textBoxDef1.Text), Double.Parse(textBoxDef2.Text)); } catch (Exception ex) { } //string result0 = "Result: 0"; //result(result0); }
public static void FunctionWith1Param(Func <double, double> operation1, double x) { RestOfTheProgram.ShowResult(operation1(x)); }