C# 如何打开控制台应用程序?
如何从另一个窗口中windows窗体上的“按钮”打开控制台应用程序。举个例子会很棒 假设这是代码:C# 如何打开控制台应用程序?,c#,C#,如何从另一个窗口中windows窗体上的“按钮”打开控制台应用程序。举个例子会很棒 假设这是代码: namespace something { class form1 : form { private void buttonPlay_Click(object sender, EventArgs e) { //I want whatever it would be to be put right here for this is the button that wo
namespace something
{
class form1 : form
{
private void buttonPlay_Click(object sender, EventArgs e)
{
//I want whatever it would be to be put right here for this is the button that would be pressed
}
}
class ConsoleApplication
{
public static void Method()
{
console.writeLine("hello World!");
}
}
}
使用Process.Start(“ConsoleApp.exe的路径”)
使用Process.Start(“到ConsoleApp.exe的路径”)
Process.Start(@"console_app.exe");