How can I document a namespace?

A namespace can be documented as any other code construct - directly in the source code. Just select any file that contains the namespace declaration and add an XML comment above the namespace/Namespace keyword. You can use VSdocman's Add XML comment option from the context menu or the comment editor.

C#:

/// <summary>This is my namespace.</summary>
namespace SampleClassLibrary
{
...
}

VB .NET:

''' <summary>This is my namespace.</summary>
Namespace SampleClassLibrary
...
End Namespace

Visual Studio will show a warning that an XML comment is not allowed on a namespace. You can whether ignore the warning or you can suppress it.

A single namespace can be used in multiple files, but you only document it in a one. It doesn't matter which one it is. If you add an XML comment for the same namespace on multiple places, VSdocman will show a warning during the compilation and a comment from a random place will be used.

In VB .NET, the root namespace has no source code representation. See how to document VB .NET root namespace.

 

Start generating your .NET documentation now!
DOWNLOAD
Free, fully functional trial
VSdocman Tip
You can use regular expressions to include or exclude documented elements.
Customers

Universities
Medical institutions
Government institutions
Large financial institutions
Thousands of SW companies

Deloitte & Touche
PricewaterhouseCoopers
Bloomberg
Wells Fargo
QBE

Caterpillar
Lear
DuPont
Pfizer

Boeing
Airbus
Rolls-Royce Naval Marine
Toyota Motorsport

Bose
Mitsubishi Electric
Johnson Controls
Bentley Systems

Intel
Hewlett Packard
Bosch (Australia)
Schneider Electric

Intergraph
Volvo Information Technology
SOPRA GROUP
Agilent Technologies
Tesco SW

Syncfusion
T-Systems
Verizon
Fraunhofer Heinrich-Hertz-Institut

vs launch partner logo

VS Mag award VS Mag award

I have been using VSdocman to provide C# .NET API integrated documentation for our customers for the past 7 years. Keeping up with Microsoft's Visual Studio version changes can be challenging for developers, but VSdocman has continued to provide excellent functionality that meet our requirements to satisfy internal and external users. This company also provides immediate excellent customer support when issues or confusion occur.

Edna Turner Stilwell, Staff Writer/.NET Lead