【发布时间】:2013-03-29 16:43:06
【问题描述】:
/// <summary>
/// Something about this generic method which works with ??? type.
/// </summary>
/// <typeparam name="T">∙∙∙</typeparam>
/// <returns></returns>
public T Foo<T>()
{
∙∙∙
}
是否可以在摘要标记中写注释以显示当前给定的泛型类型。 (就像视觉工作室一样)?
(例如我们可以在Foo<string>()的工具提示中看到Something about this generic method which works with string type.)
【问题讨论】:
-
这不会误导吗?
-
在某些情况下不是,我猜是这样。
-
@HarisHasan 例如,我们将能够看到
elementName1("xxx") 参数的提示:The element name of type boolinFoo<T1, T2>(string elementName1, string elementName2)和Foo<bool, int>("xxx", "yyy")。这不是很有帮助吗?