Does VB.NET have the equivalent of C#'s lock
statement?
Asked
Active
Viewed 3.6k times
80

gonzobrains
- 7,856
- 14
- 81
- 132

iburlakov
- 4,164
- 7
- 38
- 40
3 Answers
31
It is called SyncLock example:
Sub IncrementWebCount()
SyncLock objMyLock
intWebHits += 1
Console.WriteLine(intWebHits)
End SyncLock
End Sub

CSharpAtl
- 7,374
- 8
- 39
- 53