Mutex

C# Mutex for running single instance of a program

Here is some sample code that can be used in a c# application to make sure that only one instance of the program can run at a time. In order to do this you will use a Mutex (Mutual Exclusion) which is a type of system wide lock. In laymens terms a Mutex is like a claim to ownership of a idea. You’re telling the world that no one else can have that idea as long as you are holding claim to it.