Possible duplicate: Run single instance of an application using Mutex
I am using VS 2008 in C# on a console application. Not sure if there is any class available (process?) to limit only single console application running at a time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no such class, but you can use System.Threading.Mutex to build one.
Mutex is a synchronization primitive that can also be used for interprocess synchronization.
See example: How ensure that only one instance of an application will run?