title: How to terminate every process with the current process name except for the current process
body: <p><br>
  Im trying to terminate every process with the same name as my process without killing my process. 
  This might be a bit confusing, maybe this code will help you understand what i meant: </p>
  
  <pre><code>private static void KillExistingProcesses()
      {
          Process[] p = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
          foreach (var pro in p)
          {
              if (...) // if pro != Process.GetCurrentProcess()
              pro.Kill();
          }
      }
  </code></pre>
  
  <p>I tried doing this: </p>
  
  <pre><code>            if (!pro.Equals(Process.GetCurrentProcess()) 
              &amp;&amp; pro != Process.GetCurrentProcess())
  </code></pre>
  
  <p>But i still end up terminating my own process. <br>
  Can you guys help me with this? I just need to terminate every process with the same name of my process excpet for the current process.
  <br> Thank you :)</p>