Which code segment should you use?

You are developing an application that uses multiple asynchronous tasks to optimize performance. The application will be deployed in a distributed environment.
You need to retrieve the result of an asynchronous task that retrieves data from a web service. The data will later be parsed by a separate task.
Which code segment should you use?


A. Option A
B. Option B
C. Option C
D. Option D

microsoft-exams

2 thoughts on “Which code segment should you use?

  1. “A” is correct.

    “B” works, but it uses redundant async/await – Task is already asynchronous.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.