You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/csharp-9.0/top-level-statements.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ source code.
88
88
89
89
The method is designated as the entry point of the program. Explicitly declared methods that by convention
90
90
could be considered as an entry point candidates are ignored. A warning is reported when that happens. It is
91
-
an error to specify `-main:<type>` compiler switch when there are top-level statements.
91
+
possible to specify a different entry point via the `-main:<type>` compiler switch.
92
92
93
93
The entry point method always has one formal parameter, `string[] args`. The execution environment creates and passes a `string[]` argument containing the command-line arguments that were specified when the application was started. The `string[]` argument is never null, but it may have a length of zero if no command-line arguments were specified. The ‘args’ parameter is in scope within top-level statements and is not in scope outside of them. Regular name conflict/shadowing rules apply.
0 commit comments