0

我刚开始使用 GhostDoc,所以我希望我的问题不是愚蠢的。我想通过引用它的方法 Method1 来记录 Class1。所以,我在 Class1 的描述中使用 cref 如下。

/// <summary>
/// Use this class to do a lot of things.
/// </summary>
/// <remarks>
/// The most interesting method is <see cref="Method1"/>
/// </remarks>
public class Class1
{
    public void Method1(int a)
    { }
}

在使用 GhostDoc Pro 构建帮助文件后,我注意到 cref 没有“绑定”,也就是说,在 Remarks 下的文档中它说:“最有趣的方法是 [Method1]”(没有指向 Method1 的链接)。如何使链接出现?

4

1 回答 1

0

您需要使用完全限定的方法名称,例如

<see cref="M:MyNamespace.Class1.Method1(System.Int32)"/>

其中 MyNamespace 是您的命名空间。

一般来说,很容易找到正确的语法——打开项目的 XML 文档,编译项目,查看生成的 XML 注释文件的语法。

对于将是

M:<namespace>.<class>.<method name>(<parameters>):<return type>

我们不介意回答关于 SO 的 GhostDoc 问题,但通常您在我们的社区论坛上提问时会得到更快的帮助 - http://community.submain.com

谢谢!

于 2014-04-16T06:42:35.123 回答