class A { public int num = 3; public void m1(B b) { b.m2(this); } } class B { public void m2(A a) { Console.WriteLine(a.num); } } class Test { public static void Main(string[] args) { A a = new A(); B b = new B(); a.m1(b); //3 } }
标签:C#,void,class,关键字,num,new,public From: https://www.cnblogs.com/sound-of-wind-rain/p/16867253.html