I have been looking for a way to make a "package folder" in visual studio express 2013, the way I might do it in java is a "package" I know that I can make whole new projects called "Visual Studio Package Projects" via a wizards but all I really want is a ~container~ that puts a dot in the class name! A folder by any other name!
THIS IS WHAT I AM LOOKING FOR
THIS IS WHAT I AM PRESENTED WITH
Just add a new folder - then by default, new classes will be in that namespace. So for example, if you have a project called Foo
, and you add a folder called Bar
, then you'll end up with:
namespace Foo.Bar
{
}
at the top of classes in that folder. Namespaces are the closest C# has to Java packages. They're not quite the same, as packages in Java also affect access control - but they're close.
See more on this question at Stackoverflow