Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| Private Sub WhenExample() | |
| Dim i As Integer = 5 | |
| Try | |
| Throw New ArgumentException() | |
| Catch e As OverflowException When i = 5 | |
| Console.WriteLine("First handler") | |
| Catch e As ArgumentException When i = 4 | |
| Console.WriteLine("Second handler") | |
| Catch When i = 5 | |
| Console.WriteLine("Third handler") | |
| End Try | |
| End Sub | |
| ' Output: Third handler |