Top Level Statement in C# 9.0
CRANK

C# 9.0 introduced a new feature called Top-Level Statement. Top-Level Statement allows developers to write programs without explicitly defining the class or main method. Until C# 9.0, It was all about the Main() method where program control start and ends. With C# 9.0, you don't need to mention the Main() method or Class definition explicitly using Top-Level Statement. Let us take a look at how to use the Top-Level statement in C# and how it works internally.

dailydotnettips.com
Related Topics: C#
2 comments