CSharpTest.Net
MutexLock Constructor(String)
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace > MutexLock Class > MutexLock Constructor : MutexLock Constructor(String)

name

Glossary Item Box

Creates and locks the named mutex

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal name As String _
)
C# 
public MutexLock( 
   string name
)

Parameters

name

Example

Library/Library.Test/LockingTests/TestMutexLock.cs

C#Copy Code
using (new MutexLock("MutexLock.TestMutexLockByName"))
{
    Assert.IsFalse(CanLock(new Mutex(false, "MutexLock.TestMutexLockByName")));
}
VB.NETCopy Code
Using New MutexLock("MutexLock.TestMutexLockByName")
    Assert.IsFalse(CanLock(New Mutex(False, "MutexLock.TestMutexLockByName")))
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