收录查询

C#中未必真的必须是要使用:static void Main(string[] args)

class mySecond
{
 static int Main()
 {
  
  /* 下面是一个简单的CONSOLE程序,只是测试下main()函数之前的东西是否是死的*/
  //Console.WriteLine("测试一下手工CONSOLE工程效果如何!");
  //Console.WriteLine("\n");
  //Console.WriteLine("请敲键盘上的回车键,来关闭CONSOLE窗口");
  //Console.ReadLine();
  //return 0;
  

  /*下面的代码需要添加引用,system和system.windows.forms*/
  System.Windows.Forms.Form myForm2 = new System.Windows.Forms.Form();
  myForm2.Show();
  return 0;
 }
}

使用带有int返回类型的时候,速度上稍微要打点折扣。

posted @ 2005-07-07 08:15  ->  阅读(568)  评论(0)    收藏  举报