How to documents APIs like javadoc?

  • Thread starter Thread starter GoodMorningSky
  • Start date Start date
G

GoodMorningSky

In java I can make documentation of all API I created.
In C#, there is tags such as <summary> for documentation. However I don't
know the tool like java tool. How to do so?

Thank you.
 
There is ndoc. (search in google for NDoc). Or, csc takes a /doc: argument
which generates XML documentation from your XML comments.
 
Try "Build Comment Web Pages" from the Tools menu.

This is a good option for internal use documentation. The XML documentation
comments are probable better for documentation you would ship to clients.

To use the XML comments there are a few steps:
1. add XML doc comments to your code
2. run the C# compiler with the /doc:filename flag to extract the XML
comments
3. feed the XML file and the assembly (dll or exe) into a post processing
tool like ndoc to produce the output format of your choice

Mark
 
GoodMorningSky said:
In java I can make documentation of all API I created.
In C#, there is tags such as <summary> for documentation. However I don't
know the tool like java tool. How to do so?

The C# compiler (csc) will generate XML documentation if you set the
/doc switch (there's an option in the project settings in VS.NET as
well).

Once you have this, you can use the free NDoc tool
(http://ndoc.sf.net) to turn that into MSDN/.NETFrameworkSDK style,
JavaDoc, or a custom style.

HOWEVER... XML comments quickly become unwieldy, even if you use
<include> to include them from a separate file.

For a large project/API, we ended up having to resort to a
commercial product: Document!X http://www.documentx.com/
It's kinda pricey, but it's amazing and makes editing .NET
API docs simple without all the XML comment unsightliness.

-c
 
Back
Top