System.Tests.AppDomainTests.UnhandledException_NotCalled_When_Handled C# (CSharp) Method

UnhandledException_NotCalled_When_Handled() private method

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