C# Program.cs文件出错不能运行 急

来源:百度知道 编辑:UC知道 时间:2024/06/16 02:32:46
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());

下面这三句话全出错,说什么并不包含application什么的定义

不会的 上面的2行代码都是自动生成的啊 怎么会错呢 最后一行也没错啊 要不你创建一个窗体看下 实在不行就重新建个吧 没有错的

这句:Application.Run(new Form1());
你可能把那个Form名称改了……修改成你的新名称就行了……

确定你在顶部引用了using System.Windows.Forms;
如果没有引用,需要写全称

把异常都贴出来看看吧,