i create some project but when start App. How to Run this App one Process only and name much “test.exe” name only? when Lunch APP ? C# 2.0
Share
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.
Again, not entirely sure what it is you are going for, but my interpretation:
If you want to ensure that only a single instance of your process is ever running at once, insert the following code at the beginning of your main method (in Program.cs).
You will need to include
using System.Diagnosticsat the top of your file.Note that this is not a perfect solution, in that if a user starts two instances of the process at exactly the same time, then they will both probably close.