您好, 我有一个字符串数组,其中有大量字节变量的名称,我需要设置,我需要访问这些字符串。 我可以访问控制,这样的反思,但不起作用的变量 TextBox textBoxA = this.GetType().GetField("textBox1", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as TextBox; textBoxA.Text = "test";
TextBox textBoxA = this.GetType().GetField("textBox1", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as TextBox; textBoxA.Text = "test";