There are two aspects that can (and IMHO should, where appropriate) be covered by a namespace documentation:
- What can be found in the namespace?: Namespaces are not arbitrary groupings; the types within one namespace usually have some common theme. This categorization can be described in the namespace comments, for a single namespace identifier is seldom precise and unambiguous enough. In particular if the namespace contains a particular set of types that are meant to work together, the namespace comments are the place where the description how to use the types together should go. (Alternatively, it can inform about what types to instantiate first, or which types are the most important ones in the namespace.)
- What may be placed in the namespace?: If the namespace is meant to be extended by third parties (that add more types to it), the comments should also describe what possible future types the namespace is suitable for, and which ones are not supposed to go in the namespace. For example, you can point out that the namespace
YourCompany.Text
is meant for types related to string handling, or you can point out that it is only meant for very specific plugin types for something in the YourCompany
namespace. That information cannot be deduced from the namespace name alone.
What's more, if you use some documentation generator that formats the comments into a manual of some sorts (e.g. Sandcastle or NDoc), the namespace page (the one that lists all the types in the namespace) will receive the namespace doc comments as an additional information. Getting a brief overview rather than just a single namespace name and a (possibly very long) list of types can be considered crucial for a good namespace-based documentation.