Click or drag to resize

JavaScriptExtensionsToTask Method

Namespace:  Microsoft.ClearScript.JavaScript
Assembly:  ClearScript.Core (in ClearScript.Core.dll) Version: 7.3.1
Syntax
public static Task<Object> ToTask(
	this Object promise
)

Parameters

promise
Type: SystemObject
The promise to convert to a task.

Return Value

Type: TaskObject
A task that represents the promise's asynchronous operation.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also