I'm writing a library and I want to put documentation in my functions so that it will show up in intellisense, kind of like how the intellisense for the built in functions shows descriptions for each of the parameters and for the function itself. How do you put the documentation in? Is it through comments in the function or is it in some separate file?
views:
131answers:
4
+12
A:
Use XML comments above the function signature.
/// <summary>
/// Summary
/// </summary>
/// <param name="param1">Some Parameter.</param>
/// <returns>What this method returns.</returns>
The GhostDoc plugin can help generate these for you.
Brandon
2009-07-16 14:29:26
I'd also recommend using StyleCop for Visual Studio to enforce consistent documentation/style through a project.
Will Eddins
2009-07-16 14:42:10
@Guard, good suggestion. Inconsistent documentation is sometimes quite the pain.
Brandon
2009-07-16 14:57:13
A:
As well as the XML comments you need to enable building the documentation (in the project settings) and keep the generated XML file with the assembly.
Richard
2009-07-16 14:48:54
+2
A:
"XML Documentation Comments (C# Programming Guide) In Visual C# you can create documentation for your code by including XML tags in special comment fields in the source code directly before the code block they refer to."
http://msdn.microsoft.com/en-us/library/b2s063f7.aspx
you can then use Sandcastle to generate chm files too if you want
smnbss
2009-07-16 14:58:59