I’m creating a library for use with an application that I am building. I am building a name space structure similar to below.
MyNamespace.Validation
MyNamespace.Reports
MyNamespace.Transactions
MyNamespace.DataImport
etc...
Would it be best practice to create a solution with multiple projects for each sub namespace or one project with multiple class files for each sub namespace? Thanks.
There are pros and cons to both approaches, which you need to personally decide between for your own circumstance.
Pro to multiple projects:
Cons to multiple projects:
Personally, I think the pros far outweigh the cons in most cases. I typically will split my namespaces into separate assemblies, provided they are not related. In your case, you’re working on 4 very different concepts, so my gut feeling is that splitting makes the most sense.