CSharpTest.Net
WasNew Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace > MutexLock Class : WasNew Property

Glossary Item Box

Returns true if this object created a new named mutex

Syntax

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

Example

Library/Library.Test/LockingTests/TestMutexLock.cs

C#Copy Code
using (MutexLock lck = new MutexLock(Guid.NewGuid().ToString()))
    Assert.IsTrue(lck.WasNew);
VB.NETCopy Code
Using lck As New MutexLock(Guid.NewGuid().ToString())
    Assert.IsTrue(lck.WasNew)
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