如何使用c#连接/断开宽带连接?

时间:2013-02-24 13:43:43

标签: c# connect disconnect

我想用c#连接/断开宽带连接

  string[] lines = System.IO.File.ReadAllLines(Path);
       // System.Windows.Forms.MessageBox.Show(lines[0] + "  " + lines[1] + "  " + lines[2]);
        System.Diagnostics.Process process = new System.Diagnostics.Process();
        System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
        startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
        startInfo.FileName = "cmd.exe";
        startInfo.Arguments = string.Format("/c rasdial {0} {1} {2}",lines[2]  , lines[0]  , lines[1]);        
        process.StartInfo = startInfo;
        process.Start();

0 个答案:

没有答案