1. Download and install the Sandcastle program.
http://download-codeplex.sec.s-msft.com/download/release? projectname=shfb&downloadid=1408995&filetime=130655702941330000&build=21029
2. Use annotations in the program to clarify the code comments.
Mark |
Description |
<event> |
A description of the event that a member might raise. |
<example> |
example, which helps the class library consumer understand the sample code for the type/member usage method. |
<exception> |
A description of the exception that can be thrown by a member. |
<exclude/> |
Instructs the NDOC document engine to exclude the tagged type/member from the Code document. Does not match the "visibility" configuration of the document engine to exclude priority. |
<include> |
Include a portion of an XML file outside the code file in a code file. |
<overloads> &NBSP; |
<overloads> the tag has two forms:
- simple form, directly in overload Text that is processed as a summary of the overloaded list page. There are no notes, examples, and other areas.
- Complex form, within overload , contains summary, remarks, example and other tags representing the summary of the overloaded list page, comments, examples, and so on.
///<overloads>this method had and both overloads.</overloads ///<summary>this overload just says Hello.</summary> public void sayhello () {...} ///<summary>this one says hello to Someone.</summary> public void sayhello (String tosomeone) {...} |
<param> |
The parameter description for the member. |
<permission> |
The. NET Framework security CodeAccessPermission that is required to access a member. |
<preliminary> |
Mark a type/member as pre-release. The inner text is displayed in red as a warning text and can contain <para> to represent multiple lines of text. If internal text is missing, the default warning text is displayed: "[This document is a pre-release version and is subject to change in future releases.] ]”。 If you need to mark all types/Members as pre-release, use the document engine's preliminary configuration item. |
<remarks> |
Remarks, further comments on <summary>. |
<returns> |
"Return value". |
<seealso> |
Add a link to the see also area of the page. Please do not include this tag inside <remarks> , it is a top-level tag. There are two optional syntaxes:
- <seealso href= "http://www.microsoft.com/china/msdn/" >msdn (CHS) </seealso>
- <seealso cref= "System.Data.DataSet" >DataSet</seealso>
|
<summary> |
Summary, a summary description of the type/member. |
<threadsafety> |
Thread safety, which indicates whether the type is secure in a multithreaded environment. NDOC provides static and instance Two Boolean properties that can be automatically generated as standard text as in the. NET Framework SDK Class library documentation. The threadsafety tag can contain additional text, which is displayed below the standard text, explaining additional information. For example: <summary>the Summary description for safeclass.</summary> <threadsafety static= "true" instance= "true" > <para>more information about using the This class across thread</para> </threadsafety> public class Safeclass () {...} |
<value> |
"Property value". |
3. Compile the build project, enable Sandcastle help File Builder, and add the compiled project to the documentation Sources.
4.Build the Help file, complete.
Making a document using Sandcastle help File Builder