I create a sample class in vs2010.
Through Class View, I see the default access modifier for Main is internal.
I also see some people say that the default ac
Although you tagged your question c#, let me say that the access modifiers for the default Program.Main
generated by VS2010 actually depends on the project template, on these differ for each language. I quickly tried the following:
In a VB.NET console project, the Program
module (static class) is Friend
(i.e. internal
in C#) and the Main
static method is Public
.
In a C# console project, Program
is internal
, and Main
is private
.
That is, a C# project will simply use the default access modifiers (internal
for classes, private
for methods).