... continued
Explore how to modify async methods to return values and use multiple await statements to manage asynchronous delays. Understand how C# can run multiple async calls concurrently, reducing execution time by leveraging tasks and combinators like Task.WhenAll for improved concurrency.
We'll cover the following...
We'll cover the following...
Continuing with our example from the previous lesson, we'll now make changes to return a string from the async sleep() method. Earlier, the return type of the method was set to Task, we'll now change it to Task<String> and add a return statement. The changes appear as highlighted lines in the code widget below:
...