【发布时间】:2010-11-10 14:02:11
【问题描述】:
是否可以在不使用显式前缀(如 M: 或 T:)的情况下从 C# XML 注释中引用构造函数?
例如,以下会产生编译警告,因为编译器不喜欢“.ctor”。尝试“PublishDynamicComponentAttribute.#ctor”不好,
“PublishDynamicComponentAttribute.PublishDynamicComponentAttribute”也不好。
/// <summary>
/// Constructs a new <see cref="PublishEntityAttribute"/> instance.
/// </summary>
/// <seealso cref="PublishDynamicComponentAttribute..ctor(Type)"/>
public PublishEntityAttribute(Type entityFactoryType) :
base(entityFactoryType)
{
}
我确定类型本身是可见的。
所以,我只能使用显式前缀 M:,它会删除编译器验证,因此当类型被移动/重命名时,cref 将无效。
有什么建议吗?
【问题讨论】:
标签: c# xml constructor comments