日期:2014-05-16 浏览次数:20906 次
class Program { static public A a; static void Main() { a = new A(); } } class B { public void foo() { Program.a ... } }
static void Main() { A a = new A(); new B().foo(a); } class B { public void foo(A a) { a ... } }