我不知道你在思考什么,因为这是C#规范规定的。入口方法必须是静态的,且叫做Main。
Application startup occurs when the execution environment calls a designated method, which is referred to as the application's entry point. This entry point method is always named Main
, and can have one of the following signatures:
static void Main() {...} static void Main(string[] args) {...} static int Main() {...} static int Main(string[] args) {...}