Without using recursion how can a stack overflow exception be thrown?

前端 未结 10 1951
自闭症患者
自闭症患者 2021-01-18 04:19

Without using recursion how can a stack overflow exception be thrown?

10条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 05:04

    Since no one else has mentioned it:

    throw new System.StackOverflowException();
    

    You might do this when testing or doing fault-injection.

提交回复
热议问题