CSharpTest.Net
HasWriteLock Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace > WriteLock Structure : HasWriteLock Property

Glossary Item Box

Returns true if write access is locked

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property HasWriteLock As Boolean
C# 
public bool HasWriteLock {get;}

Example

Library/Library.Test/LockingTests/TestLockingStructs.cs

C#Copy Code
using (ILockStrategy l = LockFactory.Create())
using (new ThreadedWriter(l))
using (WriteLock w = new WriteLock(l, 0))
    Assert.IsFalse(w.HasWriteLock);
VB.NETCopy Code
Using l As ILockStrategy = LockFactory.Create()
    Using New ThreadedWriter(l)
        Using w As New WriteLock(l, 0)
            Assert.IsFalse(w.HasWriteLock)
        End Using
    End Using
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys