UnobservedTaskExceptionEventArgs Class

Task Parallel System.Threading

Provides data for the event that is raised when a faulted Task's exception goes unobserved.

Namespace:  System.Threading.Tasks
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Class UnobservedTaskExceptionEventArgs _
	Inherits EventArgs
C#
public class UnobservedTaskExceptionEventArgs : EventArgs

Remarks

The Exception property is used to examine the exception without marking it as observed, whereas the SetObserved()()() method is used to mark the exception as observed. Marking the exception as observed prevents it from triggering exception escalation policy which, by default, terminates the process.

Inheritance Hierarchy

System..::.Object
  System..::.EventArgs
    System.Threading.Tasks..::.UnobservedTaskExceptionEventArgs

See Also