What do you do when you need to create documentation for the user-defined classes and methods declared in your .NET COBOL applications?
It is a good practice to provide descriptions of the classes and methods declared in your managed COBOL applications files by adding XML documentation comments in the source files. For example, the descriptions are used by the Visual Studio IntelliSense Quick Info feature that shows tool-tips about the classes and methods you can use.
You can configure your project to generate an XML file with the comments at build time. From this file you can create documentation in CHM, Help 2 or MS Help Viewer format using a third party utility such as Sandcastle.
To add XML documentation comments do the following:
1. Open your solution in Visual Studio.
2. Open a source file which is part of a managed COBOL project.
3. Position the cursor on a line preceding a method or a class declaration.
4. Type *>> starting in column seven. This automatically inserts the construct of the documentation comment with XML tags for a summary and for descriptions of the parameters that the class or the method uses.
Note: For variable and fixed source code formats you need to start the documentation comment in column seven. For free source code format you can start typing the documentation comment anywhere on a line preceding the class or method declaration.
5. Inside the tag type a meaningful description of what the class or the method does.
6. Type descriptions inside any other tags that might be added. For example: