“查看”如何在方法文档中工作?

时间:2010-11-04 04:53:13

标签: visual-studio

/// <summary>
/// Get all following siblings of each element up to but not including the element matched by the selector.
/// </summary>
/// <param name="selector">A string containing a selector expression to indicate where to stop matching following sibling elements.</param>
/// <see cref="http://api.jquery.com/nextUntil/"/>
/// <returns></returns>
public SharpQuery NextUntil(string selector = null)
{
    throw new NotImplementedException();
}

我想在我的方法文档中添加一个链接,以链接到更全面的解释。 “看”似乎适合这种情况(intellisense建议)。但是,当我打电话开始输入我的方法时,工具提示中没有出现“see”。有没有办法去那个链接?我尝试按F1,而不是took me to MSDN

2 个答案:

答案 0 :(得分:1)

必须在其他评论标记的文本中使用<see>标记才能指定超链接。

您还可以使用<seealso>指定要在生成的文档的“请参阅”部分中显示的超链接。

MSDN提供以下示例:

/// text for class TestClass
public class TestClass
{
    /// <summary>DoWork is a method in the TestClass class.
    /// <para>Here's how you could make a second paragraph in a description. <see cref="System.Console.WriteLine(System.String)"/> for information about output statements.</para>
    /// <seealso cref="TestClass.Main"/>
    /// </summary>
    public static void DoWork(int Int1)
    {
    }

    /// text for Main
    static void Main()
    {
    }
}

答案 1 :(得分:1)

从我收集的内容: http://msdn.microsoft.com/en-us/library/5ast78ax(VS.80).aspx 此标记(,)将在生成的文档文件(XML文件,执行/ doc编译器选项时)中提供,然后由Sandcastle等工具进一步处理