📜  F#XML文档

📅  最后修改于: 2021-01-01 14:52:58             🧑  作者: Mango

F#XML文档

在F#中,您可以使用三斜杠(///)代码注释生成文档。 XML注释可以在代码文件(.fs)或签名(.fsi)文件中的声明之前。>

有两种编写xml文档注释的方法。

一种方法是只用三斜杠注释编写代码,第二种方法是使用xml标记。

F#XML文档标签表

Tag syntax Description
text It specifies that text is code. This tag can be used by documentation generators to display text in a font that is appropriate for code.
text It specifies that text is a brief description of the program element. The description is usually one or two sentences.
text It specifies that text contains supplementary information about the program element.
=”name”>descriptionparam> It specifies the name and description for a function or method parameter
=”name”>description **** It specifies the name and description for a type parameter.
text It specifies that text describes the return value of a function or method.
=”type”>description It specifies the type of exception that can be generated and the circumstances under which it is thrown.
=”reference”>text It specifies an inline link to another program element. The reference is the name as it appears in the XML documentation file. The text is the text shown in the link.
=”reference”/> It specifies a See Also link to the documentation for another type. The reference is the name as it appears in the XML documentation file. See Also links usually appear at the bottom of a documentation page.
text It specifies a paragraph of text. This is used to separate text inside the remarks tag.

F#XML文档示例

let a = 10     /// This is a integer variable.