作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
是否可以在不借助显式前缀(如 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 将无效。
有什么建议吗?
最佳答案
你像调用它一样指定一个构造函数,但使用参数的类型而不是它们的值:
/// <seealso cref="PublishDynamicComponentAttribute(Type)"/>
关于c# - 如何从 C# XML 注释中引用构造函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1124181/
我是一名优秀的程序员,十分优秀!