原文:http://www.zhufengpeixun.cn/JavaScriptmianshiti/2014-04-01/287.html < script type = "text/javascript" > var x = 1; var y = 0; var z = 0; function add(n) { n = n + 1; } y = add(x); function add(n) { n = n + 3; } z = add(x); s = y + z; &l…
看到园友的一道面试题,很好奇,测试了一下结果. public class A { public static int X=B.Y ; public A() { ++X; } } public class B { public static int Y = A.X ; static B() { ++Y; } } static void Main(string[] args) { Console.WriteLine(A.X.ToString()); Console.WriteLine("B.Y&qu…