folders/ auto namespaces // address in VS2005?

  • Thread starter Thread starter sloan
  • Start date Start date
S

sloan

In C#, (2003 and 2005),....

When you add a folder to a project, and then add a new class (in that
folder), you get automatic "namespace MyApplication.Folder" inclusion.

Example.

Your project name is "SuperBankApplication"
You add a new folder called "Exceptions".
You add a new class called "OverdrawnFundException" in that folder.

The c# code comes out

namespace SuperBankApplication.Exceptions
{
class OverdrawnFundsException
{

}
}



I know in vb.net 2003, you can't get this.

Is there an option in 2005 (please say yes) that gives you the same type of
functionality.
I understand the way vb.net does the root name space.
Same example above in vb.net, I'm looking for:

--//assumes root namespace of SuperBankApplication
Namespace Exceptions
{
class OverdrawnFundsException


end class

end Namespace
 
I think if you explicitly add a namespace tag to the top of each of the
files in your folder they will go where you want them.
 
Back
Top