title: How to get output of the cmd?
body: <p>I want to get output of the cmd result in a string</p>
  
  <pre><code>void getDevices()
  {
        Process p = new Process();
        ProcessStartInfo proc = new ProcessStartInfo();
        proc.FileName = @"C:\Users\mehmetcan\Desktop\adt-bundle-windows-x86-20130917\sdk\platform-tools\adb.exe";
        proc.Arguments = @"devices";
        Process.Start(proc);
        String output = p.StandardOutput.ReadToEnd();           
  }
  </code></pre>
  
  <blockquote>
    <p><em>Error: An unhandled exception of type 'System.InvalidOperationException' occurred in System.dll</em></p>
  </blockquote>