简体   繁体   English

Diagnostics.Process的替代品,可运行简单的shell命令!

[英]Alternatives to Diagnostics.Process to run a simple shell command!

无论如何,我需要使用c#运行一个简单的应用程序,无论如何,我的意思是要运行一个简单的shell命令而不是Diagnostics.Process?

No. Even if you use a class that does this for you, it will use System.Diagnostics.Process internally. 不会。即使您使用为您执行此操作的类,它也会在内部使用System.Diagnostics.Process。 You could use P/Invoke, but that is the OPPOSITE direction as far as simplicity. 您可以使用P / Invoke,但这是简单的相反方向。 Using System.Diagnostics.Process is by far the easiest way to do this. 到目前为止,使用System.Diagnostics.Process是最简单的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM