引用类型??
form1和form2是同一个实例呀
Form form2 = new Form;
form2 = form1;

解决方案 »

  1.   

    像Form这种对象,就是对象的引用,
    像int x 这种就是值引用。
    和C++是一样的
      

  2.   

    是啊。你的CPoint应该是个结构吧。C#里也一样。
      

  3.   

    定义一个类似拷贝构造函数的构造函数
    Class1 obj1 = new Class1(); // you get the first obj
    // Do something on obj1
    Class1 obj2 = new Class1(obj1); //Define Class1(Class1 obj) to copy the obj
    // Do something on obj2, and obj1 will not be changedOr Class1 provide a method Clone(), then
    Class1 obj1 = new Class1(); // you get the first obj
    // Do something on obj1
    Class1 obj2 = obj1.Clone(); // you get the second obj, not just a ref to obj1
    // Do something on obj2, and obj1 will not be changed