In Visual Studio 2019, when I create a new .NET Framework Console Application in C#, it places the entry point in a class called Program
in a file named Program.cs
and a namespace with the same name as my project:
namespace ProjectName
{
class Program
{
static void Main(string[] args)
{
}
}
}
I always just end up removing the namespace and renaming the class and file to EntryPoint
(.cs
), putting the entry point class in the global namespace.
sealed class EntryPoint
{
static void Main(string[] args)
{
}
}
Is there any way I can make this the default behavior for all new projects of this type from now on without manually doing that each time? In other words, can I change how the default files in this type of project look?