循环调用静态变量,你知道它的结果吗?
namespace CA_CycleInvokeStaticVariable { using System; class A { public static int X; static A() { X = B.Y + 1; } } class B { public static int Y = A.X + 1; static B() { } static void Main(string[] args) { Console.WriteLine("X = {0}, Y = {1}", A.X, B.Y); } } } //X = 1, Y = 2
posted on 2009-02-25 21:05 volnet(可以叫我大V) 阅读(438) 评论(1) 编辑 收藏 举报