The main() method

来源:互联网 发布:校园网络 布局 编辑:程序博客网 时间:2024/04/20 07:49
C# programs start execution at a method named Main(). This must
be a static method of a class (or struct), and must have a return type of either int or void.
Although it is common to specify the public modifier explicitly, because by definition the method must be
called from outside the program, it doesn’t actually matter what accessibility level you assign to the entrypoint
method — it will run even if you mark the method as private.