谁是代码高手啊?是的请留下你的联系方式

如题所述

public bool InputLogin()
{
bool bl = false;
if (txtLoginID.Text == "")
{
MessageBox.Show("账号不能为空");
return bl;

}
else if (txtLoginPWD.Text == "")
{
MessageBox.Show("密码不能为空");
return bl;

}
else
{
Form2 haha = new Form2();
haha.Show();
return true;
}
在最后的条件区中return一个值就可以了。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-08-23
631419430
相似回答