0

Using visual studio to create a windows form application. There are multiple projects contained in this solution, with each project having multiple folders. When i use the context menu in the solution explorer to add/create a new class inside of a folder, it set the access modifier to internal.

namespace Namespace.Name
{
    internal class ClassName
    {
    }
}

Any ideas why this is the default in this case?

char1es
  • 383
  • 3
  • 18
  • This is just Visual Studio being "explicit". If it wasn't there.. it would mean the same thing (as per the answer below). – Simon Whitehead May 16 '14 at 14:58
  • http://stackoverflow.com/questions/824555/why-visual-studio-doesnt-create-a-public-class-by-default – stijn May 16 '14 at 14:59

1 Answers1

5

Because this is the default access modifier for a class, which is not nested. For further documenation on this, please have a look here.

Christos
  • 53,228
  • 8
  • 76
  • 108