Reputation: 4232
Does VB.NET have the equivalent of C#'s lock
statement?
Upvotes: 82
Views: 37807
Reputation: 7512
It is called SyncLock example:
Sub IncrementWebCount()
SyncLock objMyLock
intWebHits += 1
Console.WriteLine(intWebHits)
End SyncLock
End Sub
Upvotes: 31