【问题标题】:cref doesn't create link in Object Browsercref 不在对象浏览器中创建链接
【发布时间】:2013-12-29 07:21:55
【问题描述】:

我在 C# 2010 类库中有以下代码:

/// <summary>
/// Execute all enable tests synchronously.
/// Function may throw exception if executed in invalid state (for example, all tests are disabled).
/// If function doesn't throw exception, this doesn't mean, that all tests succeeded. After function 
/// finished, it is necessary to check the state of all tests.
/// Function is synchronous and may take a long time to execute.
/// Use <see cref="SiX_Dg_RequestStop"/> function to stop this function from another thread.
/// </summary>
/// <exception cref="AtpException"></exception>
public static void SiX_Dg_Execute()
{
}

public static void SiX_Dg_RequestStop()
{
}

当我在 Visual C# Express 对象浏览器中打开这个库时,XML 注释是这样显示的:

exception cref 生成有效链接,但 see cref 显示为纯文本,并添加了完整的命名空间。我怎样才能使这个链接工作?

【问题讨论】:

  • 尝试完全限定方法 cref。这行得通吗?
  • @ThomasWeller:不,结果还是一样。
  • 并使用 IntelliSense(删除引号之间的 cref 的内容,然后按 Alt+Enter 重新插入)?
  • @ThomasWeller:Intellisense 仅显示 XML 参数,如 seeseealso 等,但不显示可用的 .NET 类。
  • 确实如此。您必须按 Ctrl + Enter(或者是 Alt + Enter?)。

标签: c# xml visual-studio-2010


【解决方案1】:

我认为 Visual Studio 的对象资源管理器没有实现那种链接。查看方法“System._AppDomain.ExecuteAssembly”msdn 的在线文档以获取您需要的示例,然后查看对象浏览器。第一个有链接,第二个没有链接。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-22
    • 2012-06-05
    • 1970-01-01
    • 2016-05-23
    • 1970-01-01
    • 2012-02-21
    • 1970-01-01
    • 2013-06-05
    相关资源
    最近更新 更多