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

前端 未结 11 1598
我寻月下人不归
我寻月下人不归 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:46

    You can call AttachConsole using pinvoke to get a console window attached to a WinForms project: http://www.csharp411.com/console-output-from-winforms-application/

    You may also want to consider Log4net ( http://logging.apache.org/log4net/index.html ) for configuring log output in different configurations.

提交回复
热议问题