csharp how to start an application and detect if started

Code Example - csharp 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();
	}
 
}