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; } }
失误!! a a1=new a(); string s=a1.a_str; string t=a.a_static_str;
谢谢你的回答,但是你的回答不能解决问题 Class Form1() { Form2 form2;//我现在是要在form2中访问Form1的成员 } Class Form2() {}
{
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;
}
}
a a1=new a();
string s=a1.a_str;
string t=a.a_static_str;
Class Form1()
{
Form2 form2;//我现在是要在form2中访问Form1的成员
}
Class Form2()
{}
其它? 上面方法解决不了?
雾水~~