c# 求解为什么在输出时等级文本框永远只有一个
using System;using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 多分支结构
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
int score=96;
if (score<60)
{
this.textBox2.Text = "小笨蛋";
}
/* else if (score <=80)
{
this.textBox2.Text = "良好";
}
else if (score<=90)
{
this.textBox2.Text = "优秀";
}*/
else
{
this.textBox2.Text = "你真棒";
}
String score1 = score.ToString();
score1 = this.textBox2.Text;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}