Skip to content

Commit 6ea8d03

Browse files
committed
Fix errors in asynchronous example code
1 parent 423bd2b commit 6ea8d03

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/Samples/CSharpCodeSamples/AsynchronousExceptionsExamples.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public void ExceptionDuringTaskExecution()
2727
try
2828
{
2929
Task myTask = SomeOperationAsync();
30+
myTask.Wait();
3031
}
3132
catch (AggregateException wrapperEx)
3233
{

src/Samples/VBCodeSamples/AsynchronousExceptionsExamples.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Public Class AsynchronousExceptionsExamples
1818
' #Region ExceptionDuringTaskExecution
1919
Try
2020
Dim myTask As Task = SomeOperationAsync()
21+
myTask.Wait()
2122
Catch wrapperEx As AggregateException
2223
Dim ex = TryCast(wrapperEx.InnerException, ArgumentException)
2324
If ex Is Nothing Then

0 commit comments

Comments
 (0)