Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task<string> WaitAsynchronouslyAsync()
- {
- var results = await WaitAsync();
- Console.WriteLine($@"I am not waiting");
- return results;
- }
- public async Task<string> WaitAsync()
- {
- await Task.Delay(10000).ConfigureAwait(false);
- return "Async programming suspension point demo.";
- }
- var results = WaitAsync();
- Console.WriteLine($@"I am not waiting");
- return await results;
- var results = WaitAsync(); // of course without await
- Console.log($@"I am not waiting");
- return results;
- var results = await WaitAsync();
- Console.WriteLine($@"I am not waiting");
- return results;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement