静态构造函数在这里的行为如何?
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);
Console.ReadLine();
}
}
输出 ::
x=1 , y=2
如何 ?