c#静态Main是怎么了?

[复制链接]
查看11 | 回复5 | 2012-4-10 19:31:13 | 显示全部楼层 |阅读模式
没有main方法呗加一个这样的类就行了
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
...
回复

使用道具 举报

千问 | 2012-4-10 19:31:13 | 显示全部楼层
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
...
回复

使用道具 举报

千问 | 2012-4-10 19:31:13 | 显示全部楼层
Main没怎么,是入口函数,没有不行的,从哪里加载呢?必须包含。...
回复

使用道具 举报

千问 | 2012-4-10 19:31:13 | 显示全部楼层
兄弟哎,冒得入口函数,你查看一下,看有没得Program.cs这个文件,打开看一下有没得Main(String[] args)字样...
回复

使用道具 举报

千问 | 2012-4-10 19:31:13 | 显示全部楼层
静态的main()方法是每个winform页面的入口方法 以上代码好像没有Main()啊...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行