I have a console application in C# in which I run various arcane automation tasks. I am well aware that this should really be a Windows Service since it nee
The most simple (and reliable) way to do this, is using a Mutex. Use the WaitOne method of the Mutex class to wait until the mutex becomes available. An added advantage, this will not require any infinite loops