Question about the VB.NET project folder

So, if I am working on a project in VB.net (indeed, any visual studio project), I can create folders. My project is becoming quite illegible (over 30 classes), and I think it would be useful to store, for example, data structure classes in the "ds" folder and user controls in the "uc" folder. This is normal? Will this affect the way I refer to classes? Are folders just for my own use and structure, or do they really have any effect on my project as a whole?

PS, if you are confused, I mean the structure shown in the "Solution Explorer". Sorry if this is a stupid question or not clear, but I have never worked on such a large project before.

+5
source share
4 answers

There are no such questions as silly questions .;) You can do it, but do yourself a favor and keep your namespaces the same as the folder hierarchy, or you can quickly put a bird's nest. For example, if the default namespace of the project is MyProject and the folder is Dc, these classes should be in

Namespace MyProject.Dc

Edit: just wrap classes to reflect the structure of your folder, for example:

Namespace MyProject.Ds
    Module MyModule

        Sub Main()
            'do stuff here
        End Sub

    End Module
End Namespace
+5
source

When adding folders by default, the namespace of any newly added files to these folders will include the name of the folder. For example, MyApp.UC or MyApp.DS.

, .. .

- :)

+4

. , .

enter image description here

, - "", Exceptions.DialogExceptionEdit ..

+2

, , , , , .

0

All Articles