阅读代码

View Code
 1  public class A
 2     {
 3         public static int P
 4         {
 5             get { return P; }//未处理 System.StackOverflowException 确保 您没有无限循环或无限递归
 6         }
 7 
 8         public A(){}
 9     }
10 
11     public class B : A
12     {
13         A a;
14         public B() {
15             a = new B();//}//未处理 System.StackOverflowException 确保 您没有无限循环或无限递归
16         }
17     }
 读上面的代码,你能发现什么问题呢?
原文地址:https://www.cnblogs.com/baoconghui/p/2068848.html