Individual projects or multiple class files ... best practice namespace in C #

I am creating a library for use with the application I am creating. I am creating a namespace structure similar to the one below.

MyNamespace.Validation
MyNamespace.Reports
MyNamespace.Transactions
MyNamespace.DataImport
etc...

Would it be best to create a solution with several projects for each additional namespace or one project with several class files for each namespace? Thanks.

+5
source share
5 answers

There are pros and cons for both approaches that you need to personally decide between your circumstances.

Pro for several projects:

  • , . .
  • , .
  • , .

:

  • , ()
  • / ()

, . , . , , .

+9

, .

  • -, .
  • , .
  • , Visual Studio

, :

- , . , , , - ( ) . , , , .

+3

, , - .

: ! , , , , .

, , . ( ), , , .

+3

.

Advantages:
- Each project can be a separate dll - All projects in one solution for easy navigation between files

+2
source

I usually followed a single assembly pattern - this is one namespace, and the DLL name is in the namespace. Easier to find which dlls to link to

+1
source

All Articles