Open a new console with every new Thread in C#?

2019-01-20 08:58发布

I want to have a new console open whenever I create a new thread so that the output will be organized. My application is fully console based. Would this be possible if so how?

Regards!

2条回答
爷的心禁止访问
2楼-- · 2019-01-20 09:55
beautiful°
3楼-- · 2019-01-20 09:57

It's not difficult to work around this limitation.

The code that you want to run as a separate thread with its own console window, simply code that as a separate console application, passing parameters as required on the command line.

Then run separate instances of this code using Start() inside your main application.

查看更多
登录 后发表回答