弹出Messagebox对话框后,如何.....

zhq1001 2012-09-08 06:24:32
if (input > earning)
{
MessageBox.Show("对不起,请修改参数","google", MessageBoxButtons.OK, MessageBoxIcon.Information);
}



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


...全文
103 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2012-09-08
  • 打赏
  • 举报
回复
MessageBox.Show("这里面有变量" + sum.ToString(),......)
zhq1001 2012-09-08
  • 打赏
  • 举报
回复
MessageBox.Show("对不起,请修改参数","google", MessageBoxButtons.OK, MessageBoxIcon.Information);

MessageBox.Show("这里面有变量sum",......)

如何在弹出的对话框里,显示变量值呢?
极地_雪狼 2012-09-08
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]
if (input > earning)
{
MessageBox.Show("对不起,请修改参数","google", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

MessageBox后面加return;看上面代码···
[/Quote]
return;
f_lash 2012-09-08
  • 打赏
  • 举报
回复
if (input > earning)
{
MessageBox.Show("对不起,请修改参数","google", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

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

110,532

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧