C# xml documentation
What's the purpose of the .xml
doc开发者_如何学Pythonumentation files shipped with the assemblies (.dll
files).
I know, how to build a one (as here, for example), but what can they be used for?
Also, if this documentation can be integrated into the MS Visual Studio environment, how should that be done?
If you put the XML file in the same folder as the DLL, Visual Studio will show descriptions in IntelliSense. (including parameter tooltips)
Using the xml documentation with the recommended tags greatly improves the readability of code when they are used by external classes.
Also, you can generate a help document from the xml comments using tools like Sandcastle. This tool generates a chm file that is very similar to the documentation that you see on msdn for .NET classes.
As for the integration into Visual Studio environment, it is done automatically and happens as soon as you build you project. While using the documented class / method / property, the Intellisense feature shows the xml comments.
In addition, free Visual Studio tools like Ghost Doc (from SubMain) allow you to generate most of the tags simply by using key board shortcuts!
精彩评论