Monsters Weekly 229 - Where is my Program Main method?

The new project templates in .NET 6 make use of Top Level statements, a feature that was introduced in C#9. The code generated by these new templates looks quite a bit different when compared to .NET 5 and you might be asking yourself ‘Where is my Program Main method!??’. Let’s dig in and find out!

Top-Level Statements -

.NET 6 Project Template Changes -

ILSpy VS Code Extension -