我尝试向 cmd 发送推荐并获取输出。我确定它已发送,但我无法获得输出。
ProcessStartInfo startinfo = new ProcessStartInfo();
startinfo.FileName = @"C:\Users\mehmetcan\Desktop\adt-bundle-windows-x86-20130917\sdk\platform-tools\adb.exe";
startinfo.Arguments = @"devices";
startinfo.RedirectStandardOutput = true;
startinfo.RedirectStandardError = true;
startinfo.UseShellExecute = false;
// Note: declare process as a variable in the class as it needs to be used in the event handlers
process = new Process();
process.StartInfo = startinfo;
它返回:“123456 devices”如何在字符串中获取它?