System Namespace Structure RRS feed

  • Question

  • As right now I'm learning about the general .NET Framework and namespaces in C#, I learned that you can create nested namespaces. What I'm wondering is with the System namespace and other namespaces such as System.Text or System.IO, are the latter two considered sub-namspaces of System or are they separate? Considering whatever the answer is to that, what are the general conventions when creating namespaces like with naming conventions or structure, and would nested namespaces be something to avoid considering it'd be more complicated?
    Saturday, November 3, 2012 8:44 AM


  • There is no real restrictions with namespace and it is left to the user.  The only recommendation is to avoid having the same full namespace (like System.IO) in more than one dll.  System can be in one dll and System.IO in a second dll.  Every porject is different and you should organize your libraries (namespaces) and classes so you and others can easily locate and maintain the source code.


    • Marked as answer by Mike Feng Thursday, November 8, 2012 6:35 AM
    Saturday, November 3, 2012 10:18 AM