0
我想让我的程序在加载时执行一堆命令,这是C#btw,但它是一个控制台程序,我该怎么做?在C#命令行应用程序上编写执行时间代码
我想让我的程序在加载时执行一堆命令,这是C#btw,但它是一个控制台程序,我该怎么做?在C#命令行应用程序上编写执行时间代码
如果您尝试从C#控制台应用程序中执行外部应用程序,请参阅ProcessStartInfo和Process类。
例子:
Process.Start("IExplore.exe", "www.google.com");
// -- OR --
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
startInfo.Arguments = "www.google.com";
Process.Start(startInfo);
你能成为一个更具体一点吗?这听起来像是你试图从你的程序中执行外部命令,这是真的吗? – jheddings 2009-11-14 19:48:33
您能否详细说明一下。 '我想让我的程序执行一堆命令'是相当混乱的。标题和标签也没有帮助。 – 2009-11-14 19:50:03