运行C#程序前 弹出一个DOS黑窗口是什么问题?
C#新建一个空项目 然后添加MDI父窗体 ,然后添加 类文件 Program.cs
然后添加Main函数 启动窗体
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace TMP02
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); //新建的窗体
}
}
}
编译 运行 为什么会出现DOS窗口 然后才弹出窗体呢?