System.Threading.Tasks.Task.Delay Method

Creates a task that will complete after a time delay.

Syntax

public static Task Delay (TimeSpan delay)

Parameters

delay
The time span 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 TaskStatus.RanToCompletion state.

Requirements

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