用程序 实现 不是 用 在 dos 里实现的那种方法

解决方案 »

  1.   

    在按钮事件里这样写
    System.Diagnostics.Process p = new System.Diagnostics.Process();  
    p.StartInfo.FileName = "cmd.exe"; 
    p.StartInfo.Arguments = "/c " + 编译命令名; 
    p.StartInfo.UseShellExecute = false;  
    p.StartInfo.RedirectStandardInput = true;
    p.StartInfo.RedirectStandardOutput = true; 
    p.StartInfo.RedirectStandardError = true;
    p.StartInfo.CreateNoWindow = true;
    p.Start();
      

  2.   

    楼上的也是调用 dos 的命令啊
      

  3.   

    那你还是用CompilerParameters 类吧,具体查MSDN,我就不多说了