Number of Classes in a Namespace - Code Smell?

Posted by Tim Claason on Programmers See other posts from Programmers or by Tim Claason
Published on 2011-02-03T17:22:02Z Indexed on 2011/02/04 15:33 UTC
Read the original article Hit count: 287

Filed under:
|
|

I have a C# library that's used by several executables. There's only a couple namespaces in the library, and I just noticed that one of the namespaces has quite a few classes in it. I've always avoided having too many classes in a single namespace because of categorization, and because subconsciously, I think it looks "prettier" to have a deeper hierarchy of namespaces.

My question is: does anyone else consider it a "code smell" when a namespace has many classes - even if the classes relate to each other? Would you put in a lot of effort to find nuances in the classes that allows for subcategorization?

© Programmers or respective owner

Related posts about c#

Related posts about count