SetException Method

AsyncVoidMethodBuilder.SetException Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Binds an exception to the method builder.

Namespace:  System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Sub SetException ( _
	exception As Exception _
)

Parameters

exception
Type: System.Exception
The exception to bind.

ExceptionCondition
ArgumentNullException

exception is Nothing.

InvalidOperationException

The builder is not initialized.

This type and its members are intended for use by the compiler.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft