title: Use CMD commands in C# For showing Tasklist
body: <p>I need to find the PID number for a process using C# and tasklist in the CMD.</p>
  
  <p>the PID number needs to be put into a textbox in a c# form.</p>
  
  <p>The code for finding the pid number in Command prompt is this. </p>
  
  <pre><code>for /f "tokens=1,2"  %a in ('  Tasklist /fi "imagename eq notepad.exe" /nh') do @echo %b
  </code></pre>
  
  <p>But I don´t know how to integrate CMD commands into C# winform. </p>