Windows Dev Center

Task.Factory Property

Provides access to factory methods for creating Task and Task<TResult> instances.

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

public static TaskFactory Factory { get; }

Property Value

Type: System.Threading.Tasks.TaskFactory
The default TaskFactory for the current task.

The factory returned from Factory is a default instance of TaskFactory, as would result from using the default constructor on TaskFactory. The most common use of this property is to create a new task and start it in one call to StartNew. For an example, see [c4bc0f44-eba2-4e96-9e03-1cc787461e61].

Windows Phone OS

Supported in: 8.1, 8.0

© 2015 Microsoft