System.Tests.AppDomainTests.UnhandledException_NotCalled_When_Handled C# (CSharp) Méthode

UnhandledException_NotCalled_When_Handled() private méthode

private UnhandledException_NotCalled_When_Handled ( ) : void
Résultat void
        public void UnhandledException_NotCalled_When_Handled()
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(NotExpectedToBeCalledHandler);
            try {
                throw new Exception();
            }
            catch
            {
            }
            AppDomain.CurrentDomain.UnhandledException -= new UnhandledExceptionEventHandler(NotExpectedToBeCalledHandler);
        }