Imports System.Threading.Tasks
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
pr()
End Sub
Private Sub pr()
Try
Dim z As Long
Parallel.For(0, 2,
Sub(i)
z = 1 / i
End Sub)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End Class