//清除
private void clean_Click(object sender, EventArgs e)
{
if (textFName.Text.ToString() != "")
{
textFName.Text = "";
}
if (textFNumber.Text.ToString() != "")
{
textFNumber.Text = "";
}
if (textSName.Text.ToString() != "")
{
textSName.Text = "";
}
if (textSNumber.Text.ToString() != "")
{
textSNumber.Text = "";
}
}
C# 清除
最新推荐文章于 2022-10-29 13:17:20 发布
这段代码定义了一个名为clean_Click的事件处理函数,当点击触发该事件的对象时,会清空四个文本输入框(textFName、textFNumber、textSName、textSNumber)内的文本。如果输入框不为空,则将文本置为空字符串。
摘要由CSDN通过智能技术生成