本文介绍了system()到c#而不调用cmd.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将系统()转换到C#,而无需调用cmd.exe?
edit:我需要抛出像dir这样的东西

how to translate system("") to C# without calling cmd.exe?edit: i need to throw something like "dir"

推荐答案

a href =http://msdn.microsoft.com/en-us/library/0w4h05yb.aspx =nofollow noreferrer> Process.Start 。示例:

As other folks noted, it's Process.Start. Example:

using System.Diagnostics;

// ...

Process.Start(@"C:\myapp\foo.exe");

这篇关于system()到c#而不调用cmd.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 14:15
查看更多