System.AccessViolationException处理

程序出现 System.AccessViolationException异常会终止进程,try catch是无法捕捉的。

 有个处理方法在引发异常的发放上面加上 [System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions] 属性,try catch就可以捕捉AccessViolationException异常,不会导致进程终止。

原文地址:https://www.cnblogs.com/jiezi/p/11447299.html