编写 XML 文档时如何在方法摘要中引用方法参数?
How do I reference method parameters in a method summary when writing XML documentation?
假设我有如下方法:
/// <summary>
/// Here I want to reference the parameter <see cref="personId"/>.
/// </summary>
/// <param name="personId">
/// The person id.
/// </param>
/// <returns>
/// The <see cref="Person"/>.
/// </returns>
public Person GetPerson(int personId)
{
}
当我使用 Sandcastle 发布我的 XML 文档时,cref:
<see cref="personId"/>
转换为 [!:personId].
Sandcastle 中的警告是:
Unknown reference link target
有什么建议吗?
<paramref name="personId"/>
假设我有如下方法:
/// <summary>
/// Here I want to reference the parameter <see cref="personId"/>.
/// </summary>
/// <param name="personId">
/// The person id.
/// </param>
/// <returns>
/// The <see cref="Person"/>.
/// </returns>
public Person GetPerson(int personId)
{
}
当我使用 Sandcastle 发布我的 XML 文档时,cref:
<see cref="personId"/>
转换为 [!:personId].
Sandcastle 中的警告是:
Unknown reference link target
有什么建议吗?
<paramref name="personId"/>