Last active
October 14, 2018 14:13
-
-
Save jesuscampos/966d8c4d8dfa95f4c90e0bfbd89955ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task DoWorkAsync() | |
{ | |
// Comienza a ejecutarse como un método síncrono | |
HttpClient client = new HttpClient(); | |
// await [Task]: se inicia la operación asíncrona y se suspende | |
// la ejecución del resto del código | |
await client.GetStringAsync(url); | |
// resto del código | |
// ... se ejecutará cuando la tarea asíncrona se complete | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment