namespace ConsoleApplication1 { class Program { static void Main(string[] args) { People p = new People(); p.age = 10; Pass(p); Console.WriteLine("p.age = {0}", p.age); Console.ReadKey(); } static void Pass(People p) { p = new People(); p.age = 20; } } class People { public int age; } }
这段程序输出后,结果会是多少呢?
博客园的朋友们,欢迎说出你们的答案哈!