MessageBox.Show(output);换成Console.Write(output)

解决方案 »

  1.   

    还是这样,cpu 100%,内存耗尽,我就是csc ping.cs,然后执行ping.exe,
    有谁知道?
      

  2.   

    我这个正常结束~~呵呵~~~using System;
    using System.Diagnostics;namespace Pingexe
    {
    class Pingexe
    {
    [STAThread]
    static void Main(string[] args)
    {
    Process proc = new Process(); 
     
    proc.StartInfo.FileName = @"ping.exe"; 
     
    proc.StartInfo.Arguments = "www.sina.com.cn"; 
    proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true;
     
    proc.Start();  
    string output = proc.StandardOutput.ReadToEnd();
    Console.WriteLine(output);
    proc.WaitForExit();
    }
    }
    }