CSharpTest.Net
ReadLock Structure
Members  Example  See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace : ReadLock Structure

Glossary Item Box

Allows a read lock to be disposed or elevated to a write lock

Syntax

Visual Basic (Declaration) 
Public Structure ReadLock 
   Inherits System.ValueType
C# 
public struct ReadLock : System.ValueType 

Example

Library/Library.Test/LockingTests/TestReaderWriterLocking.cs

C#Copy Code
using (ILockStrategy l = LockFactory.Create())
using (l.Read())
    Assert.IsFalse(l.TryWrite(10));
VB.NETCopy Code
Using l As ILockStrategy = LockFactory.Create()
    Using l.Read()
        Assert.IsFalse(l.TryWrite(10))
    End Using
End Using

Inheritance Hierarchy

System.Object
   System.ValueType
      CSharpTest.Net.Synchronization.ReadLock

Requirements

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

See Also

Generated with Document! X 2011 by Innovasys