C# catch a stack overflow exception

前端 未结 9 890
生来不讨喜
生来不讨喜 2020-11-22 09:12

I have a recursive call to a method that throws a stack overflow exception. The first call is surrounded by a try catch block but the exception is not caught.

Does

9条回答
  •  失恋的感觉
    2020-11-22 09:53

    Yes from CLR 2.0 stack overflow is considered a non-recoverable situation. So the runtime still shut down the process.

    For details please see the documentation http://msdn.microsoft.com/en-us/library/system.stackoverflowexception.aspx

提交回复
热议问题