C# 9.0 Support for Top-level programs in Visual Studio 2019
问题 With the coming of C# 9.0 and .NET 5 a new feature is getting introduced called "Top-level programs". This functionality takes away a lot of the boilerplate code necessary to create a simple C# application by not having to wrap your code in the usual namespace/class/Main method, as explained in the Welcome to C# 9.0 blog To create a simple "Hello World" application the only required code for a Top-level program is the following (taken from the blog) using System; Console.WriteLine("Hello