Sandcastle is a Microsoft-provided tool for generating Help files based on XML annotations and DLL files, currently an open source project on CodePlex, which can be downloaded here: Sandcatle Project Sandcastle itself is a console program, for ease of use, we can use his GUI version: Sandcastle help File Builder.
The first step is to add an XML comment for the code you wrote
We create a simple ClassLibrary1 project that demonstrates the most:
Using system;using system.collections.generic;using system.text;namespace classlibrary1{//<summary>//A S Ample class to show something using Sandcastle//</summary> public class SampleClass {private str ing _propertyvalue; <summary> Gets or sets the property value. </summary>//<value>the Property Value.</value> public string Property { get {return _propertyvalue; } set {_propertyvalue = value; }}///<summary>//Determines whether the property is null. </summary>//<returns>/<c>true</c> if property is null; otherwise, <c>false</c> </returns> public bool Ispropertynull () {bool result = false; if (this. property = = null) {result = true; } return result; }//<summary>//Determines whether the property is null. </summary>//<returns>//<c>true</c> if property is empty; Otherwise, <C>false</c>. </returns>//<example>//This example shows how to might use this method:// <code>//SampleClass sample = new SampleClass (); if (sample. Ispropertyempty ())////Console.WriteLine ("The property is empty"); }//else///Console.WriteLine ("The property contains value" + Sample.) property); }///</code>//</example> public bool Ispropertyempty () {bool R Esult = this. Ispropertynull (); if (!result) {result = (Property.trim (). Length = = 0); }return result; } }}
The code is simple and takes note of the XML comment.
Open the properties of the project, and in the "Build" option, make sure that "XML documentation file:" is selected.
In the second step, compile this project and you will see the generated DLL files and XML files:
Step three, open Sandcastle help File Builder
Fourth step, modify the settings
In the project's Properties window, you can modify some settings as needed.
Fifth step, generate the document
Sandcastle is a Microsoft-provided tool for generating Help files based on XML annotations and DLL files