我有一个Console工程,怎样实现运行时显示多个Console窗口,这样我就可以在一个窗口中显示运算过程信息,一个窗口中显示运算结果。还请达人指点指点。

解决方案 »

  1.   

    using System;
    using System.Collections.Generic;
    using System.Text;namespace Testconsle
    {
        class Program
        {
            public static System.Diagnostics.Process p = new System.Diagnostics.Process();        static void OpenanotherConsole(string aaa)
            {
                p = System.Diagnostics.Process.Start("TestConsle.exe",aaa);
            }
            static void Main(string[] args)
            {            if (args.Length == 0)
                {
                    Console.WriteLine("Hello,Console ");
                    OpenanotherConsole("aa");   //打开一个窗口
                    OpenanotherConsole("bb");   //再打开一个窗口
                }
                else
                {
                    Console.WriteLine("Hello,Console " + args[0]);
                }
                Console.Read();
            }
        }
    }
      

  2.   

    谢谢xiangbo_x() ,System.Collections.Generic是在 .NET Framework 2.0 版中新增的,我现在的开发环境是 .NET Framework 1.x,能够在 .NET Framework 1.x实现吗?
      

  3.   

    System.Diagnostics.Process.Start("TestConsle.exe","进程名");
    不就可以了?