Object
EventArgs
UnhandledExceptionEventArgs
mscorlib
RuntimeInfrastructure
Provides data for the event that is raised when an exception is not caught by the program code executing in an application domain.
UnhandledExceptionEventArgs provides access to the uncaught Exception and a property indicating whether the system will terminate the current process.
System Namespace
UnhandledExceptionEventArgs Constructors
UnhandledExceptionEventArgs Constructor
UnhandledExceptionEventArgs Properties
UnhandledExceptionEventArgs.ExceptionObject Property
UnhandledExceptionEventArgs.IsTerminating Property
Constructs and initializes a new instance of the UnhandledExceptionEventArgs class.
- exception
- The exception that was not caught.
- isTerminating
trueif the system will terminate the current process; otherwise,false.
This constructor initializes the System.UnhandledExceptionEventArgs.ExceptionObject property using exception, and the System.UnhandledExceptionEventArgs.IsTerminating property using isTerminating.
System.UnhandledExceptionEventArgs Class, System Namespace
public object ExceptionObject { get; }
Gets the uncaught exception.
A Object, typically a Exception, that is the cause of the current event.
This property is read-only.
System.UnhandledExceptionEventArgs Class, System Namespace
public bool IsTerminating { get; }
Gets a Boolean value indicating whether the system is terminating the current process.
trueif the system will end the current process as a result of the current unhandled exception; otherwise,false.
This property is read-only.[Note: This property returns
truewhen an exception is received in, but not handled by, an application's main thread. This property also returnstrueif an unmanaged thread is executing managed code and receives an unhandled exception. System.UnhandledExceptionEventArgs.IsTerminating returnsfalsefor managed threads created by an application, and for unhandled exceptions thrown during object finalization.]
System.UnhandledExceptionEventArgs Class, System Namespace