private void button1_Click(object sender, EventArgs e)
{
try
{
if (Convert.ToUInt32(textBox1.Text) < 0 && Convert.ToUInt32(textBox1.Text) > 100)
{
MessageBox.Show("分数不能大于100小于0",错误);return;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString(),错误);return;
}
MessageBox.Show("您的分数为"+textBox1.Text)
}
温馨提示:答案为网友推荐,仅供参考