system()到c#而不调用cmd.exe [英] system() to c# without calling cmd.exe

查看:189
本文介绍了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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆