在编写程序的XML文档时,我遇到了一个问题,需要记录此方法:
internal void MethodB(int i, DateTime? date = null);
我遇到的问题是与
date
参数相关的。正如您所见,它是可选的,也是可为空的。下面是我尝试记录此方法的方式:/// <summary>
/// This method uses <see cref="MethodB(Int32, System.DateTime)"/> internally
/// todo some stuff.
/// </summary>
具体来说,我得到了编译器警告,表明无法解析cref的值。
我该如何修复我的XML文档注释,以便它可以在没有警告的情况下编译?
Nullable{DateTime}
)的内容在注释浏览器中显示时将不会显示为Nullable<DateTime>
,而是显示为Nullable<T>
。 - Neil