110,534
社区成员
发帖
与我相关
我的任务
分享
if(string.IsNullOrEmpty(this.textBox2.Text.Trim()))
{
//操作
}
if (string.IsNullOrEmpty(textBox1.Text.Trim()))
{
MessageBox.Show("a不能为空");
}
if (string.IsNullOrEmpty(textBox2.Text.Trim()))
{
MessageBox.Show("b 不能为空");
}
string a = textBox1.Text.Trim();
int d =int.Parse( textBox2.Text.Trim());
if (string.IsNullOrEmpty(textBox1.Text.Trim()))
{
MessageBox.Show("a不能为空");
}
else if (string.IsNullOrEmpty(textBox2.Text.Trim()))
{
MessageBox.Show("b 不能为空");
}
string a = textBox1.Text.Trim();
int d =int.Parse( textBox2.Text.Trim());
string a = textBox1.Text.Trim();
int d =int.Parse( textBox2.Text.Trim());
if (string.IsNullOrEmpty(a))
{
MessageBox.Show("a不能为空");
}
else if (string.IsNullOrEmpty(d.ToString())) //string.IsNullOrEmpty针对string类型
{
MessageBox.Show("d 不能为空");
}