StackOverFlowException每当我实例化A类的实例时,我都会不断获取.我知道这与A.b字段是从类A派生的类型有关.但为什么会导致异常呢?
static void Main(string[] args)
{
A a = new A(); // exception
}
class A
{
private B b = new B();
}
class B:A {}
Run Code Online (Sandbox Code Playgroud)
谢谢