Imports System
Imports System.Collections
Class MainClass
Public Sub New()
Dim myCollection As New ArrayList()
Dim item As Object
SyncLock myCollection.SyncRoot
For Each item In myCollection
' Insert your code here.
Next item
End SyncLock
End Sub
End Class