Answers for "c# how to start an application and detect if started"

C#
0

c# how to start an application and detect if started

using System.Diagnostics;
using System.IO;
using System.Reflection.Assembly;

class Class
{
	if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(GetEntryAssembly().Location)).Count() > 1) 
	{
		Process.GetCurrentProcess().Kill();
	}
 
}
Posted by: Guest on July-21-2021

Code answers related to "c# how to start an application and detect if started"

C# Answers by Framework

Browse Popular Code Answers by Language