Is there a lock statement in VB.NET?

Solution 1:

Yes, the SyncLock statement.

For example:

// C#
lock (someLock)
{
    list.Add(someItem);
}

// VB
SyncLock someLock
    list.Add(someItem)
End SyncLock

Solution 2:

It is called SyncLock example:

Sub IncrementWebCount()
    SyncLock objMyLock
        intWebHits += 1
        Console.WriteLine(intWebHits)
    End SyncLock
End Sub