class A
{
public A()
{
A gg = new A();
} static void Main()
{
A gg1 = new A();
}
}谢谢。Process is terminated due to StackOverflowException. 错误内容
{
public A()
{
A gg = new A();
} static void Main()
{
A gg1 = new A();
}
}谢谢。Process is terminated due to StackOverflowException. 错误内容
不断地递归调用自身,不让堆栈溢出才是怪事呢。
public A()
{
A gg = new A();
}就是公有构造函数中的代码导致出错。