我创建了一个文本框并希望在静态方法中引用它。我怎样才能做到这一点?这是我的代码
private void Form1_Load(object sender, EventArgs e)
{
TextBox textbox2 = new TextBox();
textbox2.Text = "A";
}
static void gettext()
{
textbox2.Text = "B"; //here is my problem
}