public partial class MyForm : Form { public string Name { get; set; }
public MyForm() { InitializeComponent(); Name = "kobe"; this.textBox1.DataBindings.Add("Text", this, "Name", false, DataSourceUpdateMode.OnPropertyChanged); }
private void button1_Click(object sender, EventArgs e) { Name = "Jordan"; } }}
为什么修改textbox1中的值。。num就跟着修改了。我在click中设置Name的值。确不能更新到textbox1中!!!!!!!!????