在C#表格中,我做了以下工作:
Label Some; string S;
private void Something()
{
Some.text = S;
Some.Location = new Point(100, 100);
Some.Size = new Size(300, 300);
this.Controls.AddRange(new System.Windows.Forms.Control[] { Some });
}
然后我用点击事件界定了S:
private void YARR_click(object sender, System.EventArgs e)
{
S="Some random text";
}
另一项:
private void HARR_click(object sender, System.EventArgs e)
{
S="Some other random text";
}
在我点击“Some”之后,“Some”没有将其案文改为“S”价值...... 我失踪了什么?