namespace _3.Label和TextBox控件使用
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
//给TextBox注册一个事件,当文本框改变时赋值给Label
label1.Text= textBox1.Text;
}
}
}