C# – Using top-level statements
The top-level statements feature makes the Main() method implicit. This feature was added in C# 9 (.NET 5) with the purpose of decluttering a project’s entry point. Here’s what a console app looks like using a top-level statement: The compiler generates the Main() method implicitly from the top-level statements. The code above is functionally equivalent … Read more