Microsoft Certified Solutions Developer (MCSD) Certification Practice Test

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for your Microsoft Certified Solutions Developer (MCSD) exam with flashcards and multiple choice questions. Each question includes hints and explanations to help you succeed. Get ready for your exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which method is called to start a Task using the TaskFactory?

  1. StartNew

  2. BeginTask

  3. RunTask

  4. ExecuteTask

The correct answer is: StartNew

The method used to initiate a Task through the TaskFactory is called StartNew. This method creates and starts a new task and returns the Task object representing it. This is particularly useful for scenarios where you want to run code asynchronously in a separate thread and immediately begin its operation. The StartNew method allows you to specify the action to be performed by the task as well as various options like task creation options and cancellation tokens. It is designed specifically for scenarios where you need to start a task without needing to create a separate delegate or method to handle its operation. This direct way of starting a task makes it straightforward for developers to utilize asynchronous programming effectively. Other methods like BeginTask, RunTask, and ExecuteTask do not exist within the TaskFactory’s API or do not serve the same purpose for starting tasks. Therefore, understanding the purpose of StartNew in the context of creating and starting tasks within the Task parallel library is essential.