C# Feature – Top-level statements
Overview
Section titled “Overview”Top-level statements allow a single file program without explicit Program class or Main method.
Introduced In
Section titled “Introduced In”C# 9 (2020)
Before
Section titled “Before”class Program{  static void Main(string[] args)  {    Console.WriteLine("Hello");  }}Console.WriteLine("Hello");Gotchas & Best Practices
Section titled “Gotchas & Best Practices”- Only one file can contain top-level statements.
 - The implicit Main may be async if you use await.