这个为什么不论是 form1 = form2;还是form2=form1;这两个引用变量最后都引用form1的那个实例。不应该是把“=”后边的交给前边的引用吗。
Form form1 = new Form();
Form form2=new Form();
form1 = form2;
//form2=form1;
//form1.Text = "1";
form1.ShowDialog();
form2.ShowDialog();
Console.WriteLine(form1.GetHashCode());
Console.WriteLine(form2.GetHashCode());