求助!C#中Windows窗口变量的调用?
我建了2个Windows应用程序的窗口,在Form1中定义了public int x=10;private void button1_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
if(radioButton1.Checked==true)
{
x = x + 1;
}
f.Show();
this.Visible = false;
return;
}
在执行button1按钮后,在Form2中显示的x值仍然是10?
怎么改变x的值?