如何在一个窗体中访问令一个窗体的的成员的方法。

解决方案 »

  1.   

    实例化,然后引用.要是传过去,就this.Owner
      

  2.   

    class a
    {
    public static string a_static_str;
    public string a_str;
    }
    class b
    {
    void method()
    {
    a a1=new a();
    string s=a1.a_static_str;
    string t=a.a_str;
    }
    }
      

  3.   

    失误!!
    a a1=new a();
    string s=a1.a_str;
    string t=a.a_static_str;
      

  4.   

    谢谢你的回答,但是你的回答不能解决问题
    Class Form1()
    {
        Form2 form2;//我现在是要在form2中访问Form1的成员
    }
    Class Form2()
    {}
      

  5.   

    是访问form1的控件? 设置可访问级别即可
    其它? 上面方法解决不了?
    雾水~~