Open
Description
For .NET 6, the console project template was changed to use top-level statements. The code that is created in Program.cs is:
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
In earlier versions of .NET and .NET Core, the code that is created in Program.cs is:
using System;
using System.Collections.Generic;
using System.Linq;
namespace MyApp // Note: actual namespace depends on the project name.
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Discussion about whether this was a good change began in #26313 but there was some confusion about what exactly the various up or down votes applied to. This issue provides comments to vote on that clearly describe the options.