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
orint
.
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.
精彩评论