有一個bat 內容是start 123.exe 127.0.0.1 4545 , 是運行123.exe 去指定的ip 和端口\如何用c#是如何表達呢? 我知道以下代碼是可以運行123.exe , 但如何加入指定的ip和端口呢??
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
Process game= new Process();
// FileName 是要執行的檔案
game.StartInfo.FileName = "123.exe";
game.Start();
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
Process game= new Process();
// FileName 是要執行的檔案
game.StartInfo.FileName = "123.exe";
game.Start();
}
}
Process p = new Process();
p.StartInfo.FileName = "123.exe";
p.StartInfo.Arguments = "127.0.0.1 4545";
p.Start();