Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Namespaces in VB a question and and suggestion

Back to Forum: Tech Off
  • User profile image
    steinvk

    Hello

    In C# when you create a new class, the IDE inserts namespace for you.  And the namespace is the folder structure in the solution.   Is this possible to do in VB ?    

    I know what namespaces in VB is different then C#, but it should be possible to insert a parameter into the templates to do this ? 

    Anybody done this ?  

    For future versions of VB I really hope they will include this.     We use namespaces in VB also  Smiley

     

    Regards

    Stein

     

  • User profile image
    davewill

    @steinvk: you can wrap a class in the namespace/end namespace construct.  isn't that what you want?

  • User profile image
    lucianoc

    You could update the wizards provided with Visual Studio.

  • User profile image
    steinvk

    Sorry if I was unclear   Smiley

    I want VB to behave like C# when I add a new class to my solution.

    i.e    I have a folder called   Views   in my solution.

    When I add a new class to the Views folder I want VB to insert

    namespace  Views

    public class MyNewClass

    End Class

    end namespace

    This is what C# does when you add a new class to a C# solution.

    I know that VB don't do this by default now and I haven't found a way to add this to the templates either

    Regards 

    Stein

     

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.