/// <summary>
/// Something about this generic method which works with ??? type.
/// </summary>
/// <typeparam name="T">∙∙∙</typeparam>
/// <returns></returns>
public T Foo<T>()
{
∙∙∙
}
是否可以在摘要标签中写一个注释来显示当前给定的通用类型。 (就像 visual-studio 那样)?
(例如我们可以在Something about this generic method which works with string type.
的工具提示中看到Foo<string>()
)
最佳答案
这个标签应该这样做 <typeparamref name="T"/>
Recommended Tags for Documentation Comments (C# Programming Guide)
关于c# - 如何在 C# XML 摘要中显示泛型类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15707551/