We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9773afc commit 2419e81Copy full SHA for 2419e81
snippets/csharp/VS_Snippets_CLR_System/system.aggregateexception.class/cs/exception1.cs
@@ -17,10 +17,12 @@ static async Task Main(string[] args)
17
18
// Use this line to throw an exception that is not handled.
19
// Task task1 = Task.Factory.StartNew(() => { throw new IndexOutOfRangeException(); } );
20
- try {
+ try
21
+ {
22
await task1;
23
}
- catch (AggregateException ae) {
24
+ catch (AggregateException ae)
25
26
ae.Handle((x) =>
27
{
28
if (x is UnauthorizedAccessException) // This we know how to handle.
0 commit comments