Returns true if read access is locked
Syntax
Visual Basic (Declaration) | |
---|
Public ReadOnly Property HasReadLock As Boolean |
C# | |
---|
public bool HasReadLock {get;} |
Example
Library/Library.Test/LockingTests/TestLockingStructs.cs
C# | Copy Code |
---|
using (ILockStrategy l = LockFactory.Create())
using (new ThreadedWriter(l))
using (ReadLock r = new ReadLock(l, 0))
Assert.IsFalse(r.HasReadLock); |
VB.NET | Copy Code |
---|
Using l As ILockStrategy = LockFactory.Create()
Using New ThreadedWriter(l)
Using r As New ReadLock(l, 0)
Assert.IsFalse(r.HasReadLock)
End Using
End Using
End Using |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also