private void button1_Click(object sender, EventArgs e)
{ string email = textBox1.Text;
string[] strs =email.Split('@');
if (strs.Length!=2)
{
MessageBox.Show("输入不合法");
return;
}
textBox2.Text = strs[0];
textBox3.Text = strs[1];
}
private void button1_Click(object sender, EventArgs e)
{ string email = textBox1.Text;
string[] strs =email.Split('@');
if (strs.Length!=2)
{
MessageBox.Show("输入不合法");
return;
}
textBox2.Text = strs[0];
textBox3.Text = strs[1];
}
转载于:https://www.cnblogs.com/jessica9920/archive/2012/10/09/2716336.html