| Visual Basic (Usage) |  Copy Code | 
|---|---|
| Dim instance As SafeLock Dim timeout As Integer Dim value As Boolean value = instance.TryEnter(timeout) | |
Parameters
- timeout
- The number of milliseconds to wait.
Return Value
True if the lock was acquired.| Exception | Description | 
|---|---|
| System.InvalidOperationException | Thrown if the lock state is inconsistent. | 
Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x
 
     
     
     
     
    
    