Allow a sequence of statements to occur right before the namespace_member_declarations of a compilation_unit (i.e. source file).
The semantics are that if such a sequence of statements is present, the following type declaration, modulo the actual type name and the method name, would be emitted:
static class Program
{
static async Task Main()
{
// statements
}
}
Proposal: https://github.com/dotnet/csharplang/blob/main/proposals/top-level-statements.md Open issues and TODOs are tracked at #41704. Test plan: #43563. See also dotnet/csharplang#3117.