指教菜鸟哈,委托全写在一个窗体里还是委托么,下面代码写在一个窗体里,算委托么
double first, second;
string input;
bool sfcz = false;
delegate double ProcessDelegate(double param1,double param2);
private double add(double param1, double param2)
{
return param1 + param2;
}
private double del(double param1, double param2)
{
return param1 - param2;
}
private double Multiply(double param1, double param2)
{
return param1 * param2;
}
private double Divide(double param1, double param2)
{
return param1 / param2;
}
//数字1按钮事件 其他数字类似 不多写了
private void button1_Click(object sender, EventArgs e)
{
if (sfcz)
{
sfcz = false;
textBox1.Text = "";
}
textBox1.Text += "1";
}
//加号按钮事件 其他减乘除类似 不多写了
private void button11_Click(object sender, EventArgs e)
{