Imports System
Imports System.Threading
Public Class ThreadWork
Public Shared Sub DoWork()
Dim i As Integer
For i = 0 To 2
Console.WriteLine("Working thread...")
Thread.Sleep(100)
Next i
End Sub 'DoWork
End Class 'ThreadWork
Class ThreadTest
Public Shared Sub Main()
Dim myThreadDelegate As New ThreadStart(AddressOf ThreadWork.DoWork)
Dim myThread As New Thread(myThreadDelegate)
myThread.Start()
Dim i As Integer
For i = 0 To 2
Console.WriteLine("In main.")
Thread.Sleep(100)
Next i
End Sub 'Main
End Class 'ThreadTest