System.UnhandledExceptionEventHandler Delegate

public delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e);

Base Types

Object
  Delegate
    UnhandledExceptionEventHandler

This type implements ICloneable.

Assembly

mscorlib

Library

RuntimeInfrastructure

Summary

Defines the shape of methods that handle the event that is raised by the system for uncaught exceptions.

Parameters

sender
The application domain that handled the System.AppDomain.UnhandledException event.
e
A UnhandledExceptionEventArgs that contains the event data.

Description

A UnhandledExceptionEventHandler instance can only be specified for the default application domain that is created by the system to execute an application. Specifying a UnhandledExceptionEventHandler for a AppDomain created by an application has no effect.

[Note: A UnhandledExceptionEventHandler instance is used to specify methods that are invoked in response to exceptions that are not caught. To associate an instance of UnhandledExceptionEventHandler with an application domain, add the UnhandledExceptionEventHandler to the System.AppDomain.UnhandledException event. The methods referenced by the UnhandledExceptionEventHandler instance are invoked whenever an object, typically a Exception, is thrown and is not caught.]

[Note: For additional information about events, see Partitions I and II of the CLI Specification.]

See Also

System Namespace