世界杯红牌 / 2025-06-10 05:51:34

在framework框架下,通过添加HandleProcessCorruptedStateExceptionsAttribute属性来解决这个问题,

(.net core1.0到3.1之前,不支持从损坏的进程状态异常中恢复,即try catch 没有防止闪退的作用)

具体可查看MSDN:https://learn.microsoft.com/zh-cn/archive/msdn-magazine/2009/february/clr-inside-out-handling-corrupted-state-exceptions

点击查看代码

[System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute()]

private void ThirdPartyCall()

{

try

{

return Call3rdPartyFunction()

}

catch (Exception exInstantiate)

{

...

}

}

wampserver本地环境启动后显示橙色不显示绿色解决方法
嘴上起泡是什么原因