Last active
December 23, 2019 22:26
-
-
Save nicolastakashi/09f4e80222436640872fe72fefc51003 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var calcularSalarioTask = CalcularSalarioAsync(); | |
| calcularSalarioTask.ContinueWith(t => | |
| { | |
| var erros = t.Exception as AggregateException; | |
| if (erros == null) | |
| { | |
| Console.WriteLine(t.Result); | |
| } | |
| else | |
| { | |
| Exception excecaoAtual = errors.InnerExceptions.First(); | |
| Console.WriteLine(excecaoAtual.Message); | |
| } | |
| }, TaskScheduler.FromCurrentSynchronizationContext()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment