【发布时间】:2019-04-09 00:20:03
【问题描述】:
鉴于此代码:
/// <summary>
/// Implementations represent a configuration with a specific data
/// type <see cref="T"/> that can be used by this application.
/// </summary>
internal interface IConfiguration<T>
{
}
我在see cref XML 元素内的T 上收到编译器警告CS1723:
XML 注释具有引用类型参数的 cref 属性“T”
MS Docs 在这种情况下完全没用。我为什么要关心这个警告?这是什么原因?
【问题讨论】:
-
我认为
<see cref="">标签旨在指向另一个接口、类或其他类似的东西。在这里,您指向一个可能不存在的名为“T”的类型,因此它告诉您您的文档错误 -
表示到另一个代码实体的链接。您希望此链接指向哪里?
标签: c# visual-studio visual-studio-2017 compiler-warnings code-documentation