日期:2014-05-17  浏览次数:20817 次

弹出Messagebox对话框后,如何.....
C# code
if (input > earning)
                {
                    MessageBox.Show("对不起,请修改参数","google", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }



弹出对话框后,停止执行后面的代码,该怎么写呢?




------解决方案--------------------
if (input > earning)
{
MessageBox.Show("对不起,请修改参数","google", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

MessageBox后面加return;看上面代码···
------解决方案--------------------
探讨
if (input > earning)
{
MessageBox.Show("对不起,请修改参数","google", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

MessageBox后面加return;看上面代码···

------解决方案--------------------
MessageBox.Show("这里面有变量" + sum.ToString(),......)