How do I show a console output/window in a forms application?

前端 未结 11 1599
我寻月下人不归
我寻月下人不归 2020-11-22 11:15

To get stuck in straight away, a very basic example:

using System;
using System.Windows.Forms;

class test
{ 
    static void Main()
    { 
        Console.W         


        
11条回答
  •  误落风尘
    2020-11-22 11:44

    If you are not worrying about opening a console on-command, you can go into the properties for your project and change it to Console Application

    .

    This will still show your form as well as popping up a console window. You can't close the console window, but it works as an excellent temporary logger for debugging.

    Just remember to turn it back off before you deploy the program.

提交回复
热议问题