开发者

I can't change static void Main(string[] args)

I can't change static void Main(string[] args) in开发者_JAVA技巧 console application. Can anyone please tell me how to change it to anything else?


If you mean you can't change it to be non-static, or you can't change the name of it, that's right: the entry point for an application:

  • must be called Main
  • must be static
  • must either be parameterless or have a single parameter of type string[]
  • must have a return type of void or int.

What are you trying to change, and why?


If you change the 'static' from the 'static void main' from the program, the application will be unable to debug, and if put string[] args or not nothing will be happen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜