我的代码包含一个带有一个方法的类,该方法返回一个最初作为参数传递给另一个方法的对象.我想在XML文档标记中指出这种关系.
class XmlDocThing
{
/// <summary>
/// Documentation for the other method.
/// </summary>
/// <param name="howDoIReferToThis">Magic object.</param>
public void AnotherMethod(object howDoIReferToThis) { }
/// <summary>
/// Documentation for this method.
/// </summary>
/// <returns>The object passed as the <paramref name="howDoIReferToThis"/>
/// argument of the <see cref="AnotherMethod"/> method.</returns>
public object FromThisMethod() { return null; }
}
Run Code Online (Sandbox Code Playgroud)
这导致警告:
警告1对"MyNamespace.XmlDocThing.FromThisMethod()"的XML注释具有"howDoIReferToThis"的paramref标记,但该名称没有参数
<see cref="AnotherMethod"/>执行方法引用的元素按预期工作,但<paramref>似乎没有cref属性(似乎只适用于方法和属性成员)或任何等效项.
这是否可能,如果是这样,怎么样?
| 归档时间: |
|
| 查看次数: |
108 次 |
| 最近记录: |