Predefined Tag | Used For |
[To be encolosed in <>] | |
c | a way to indicate that text within a description should be marked as code |
code | a way to indicate multiple lines as code |
example | lets you specify an example of how to use a method or other library member |
exception | lets you document an exception class |
include | you refer to comments in another file, using XPath syntax, that describe
the types and members in your source code. |
list | Used to insert a list into the documentation file |
para | Used to insert a paragraph into the documentation file |
param | Describes a parameter |
paramref | gives you a way to indicate that a word is a parameter |
permission | lets you document access permissions |
remarks | where you can specify overview information about the type |
returns | describe the return value of a method |
see | lets you specify a link |
seealso | lets you specify the text that you might want to appear in a See Also section |
summary | used for a general description |
value | lets you describe a property |
One example for such a cs file would be
/// <summary>
/// Public Base Form
/// </summary>
public partial class BaseForm : Form
{
/// <summary>
/// Constructor
/// </summary>
public BaseForm()
{
InitializeComponent();
}
.
.
.
/// <summary>
/// For invoking the reset button clicked event in the derived form
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected virtual void OnResetButtonClicked(object sender, EventArgs e)
{
}
#endregion
}
One drawback of this documentation is it requires comments for all the methods and events.Nothing can be missed or it keeps on throwing bugs.
Now take the project properties and under build tab,click on the XML Documentation File checkbox and the page now looks like,
Now build the project.In the bin\debug folder the xml file will be build.
Cheers!