System.Runtime.Versioning.MultitargetingHelpers.IsCriticalException C# (CSharp) Method

IsCriticalException() private static method

private static IsCriticalException ( Exception ex ) : bool
ex System.Exception
return bool
        private static bool IsCriticalException(Exception ex)
        {
            return ex is NullReferenceException
                    || ex is StackOverflowException
                    || ex is OutOfMemoryException
                    //|| ex is System.Threading.ThreadAbortException
                    || ex is IndexOutOfRangeException
                    || ex is AccessViolationException;
        }
 

Usage Example

 private static bool IsSecurityOrCriticalException(Exception ex)
 {
     if (!(ex is SecurityException))
     {
         return(MultitargetingHelpers.IsCriticalException(ex));
     }
     return(true);
 }
All Usage Examples Of System.Runtime.Versioning.MultitargetingHelpers::IsCriticalException