Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm using 2003.

 

Is there a way to manage namespaces easily in VB.Net without typing:

 

Namespace Events

End Namespace

 

and moving your code between it for every class you want to include?

 

I recall one of the niftier things about C# was that it automatically set the namespace to the directory structure of your project. If you created a folder called Events within a folder called Dependancies, every class within Events is now of the namespace Dependances.Events.

 

I'd like to just put things in a folder or just select 8 files and add it all at once... maybe I'm just lazy?

Posted

VB will allow you to set a root level namespace, one that will apply to all your classes and files as you create them. It is in the project properties section. I believe it is defaulted to the name of your project. This namespace won't be in the code but it will apply to all classes in your project.

 

If you want the namespace in the code or want to sub-namespace under the project namespace ther is no way to do that. You could try writing/finding a plug-in that could do this...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...