20090402的System.StackOverflowException 异常

一般来说,这是因为你的程序里有死循环

最常见的一种情况是属性自己调用自己,导致栈溢出.   

如:  
  public   class   A  
  {  
          private   int   i   =   0;  
          //访问这个属性就出现问题。  
          public   int   I  
          {    
                  get{return   I;}  
                  set{I   =   I;}  
          }  
           
  }  
  //正确的为:  
  public   int   I  
  {    
              get{return   i;}  
                set{i   =   I;}  
  }  
  好多粗心的人就范这个错。

原文地址:https://www.cnblogs.com/wantingqiang/p/1427926.html