PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

8 Comments on “Which code segment should you use?

  1. ivannathan says:

    Both – A and B works and correct depending on what’s inside of GetData.

    A is correct when it returns Task directly from another async method.
    B is correct when it returns string from another async method using await.

    I consider that A is better answer.




    0



    0

Leave a Reply