Assemblies: System.Threading.Tasks (in System.Threading.Tasks.dll)
mscorlib (in mscorlib.dll)
This property returns a default instance of the TaskFactory class that is identical to the one created by calling the parameterless TaskFactory::TaskFactory() constructor. It has the following property values:
nullptr, or TaskScheduler::Current
The most common use of this property is to create and start a new task in a single call to the TaskFactory::StartNew method.
The following example uses the static property to make two calls to the TaskFactory::StartNew method. The first populates an array with the names of files in the user's MyDocuments directory, while the second populates an array with the names of subdirectories of the user's MyDocuments directory. It then calls the TaskFactory::ContinueWhenAll(array<Task>, Action<array<Task>>) method, which displays information about the number of files and directories in the two arrays after the first two tasks have completed execution.