asked on
ASKER
Mutex mut = new Mutex(false, "my_globally_unique_mutex");
mut.WaitOne();
// do your file thing
mut.ReleaseMutex();
C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).
TRUSTED BY
You cannot set a mutex "lock" on a file. There is no such thing. What are you trying to achieve? Maybe another technology is more up to the task?
Cheers,
-- Abel --