System.Threading.Tasks.Task.Delay Method

Creates a task that will complete after a time delay.

Syntax

public static Task Delay (int millisecondsDelay)

Parameters

millisecondsDelay
The number of milliseconds to wait before completing the returned task

Returns

A task that represents the time delay

Remarks

After the specified time delay, the task is completed in RanToCompletion state.

Requirements

Namespace: System.Threading.Tasks
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0