【发布时间】:2019-11-28 15:51:36
【问题描述】:
有没有办法让 Visual Studio 2019 (Enterprise) 识别 Intellisense 的非 XML 文档字符串,以便当您将鼠标悬停在它上面时,它会显示摘要、参数等?具体来说,与在 C# SDK 中格式化文档字符串的方式相同。
例如,对于Thread.Sleep(millisecondsTimeout),它具有以下文档字符串:
//
// Summary:
// Suspends the current thread for the specified number of milliseconds.
//
// Parameters:
// millisecondsTimeout:
// The number of milliseconds for which the thread is suspended. If the value of
// the millisecondsTimeout argument is zero, the thread relinquishes the remainder
// of its time slice to any thread of equal priority that is ready to run. If there
// are no other threads of equal priority that are ready to run, execution of the
// current thread is not suspended.
//
// Exceptions:
// T:System.ArgumentOutOfRangeException:
// The time-out value is negative and is not equal to System.Threading.Timeout.Infinite.
这是出现的内容:Intellisense tooltip
我发现 XML 标记 (<param>millisecondsTimeout</param>) 的想法在查看代码时会损害可读性,并且想知道是否有一种方法可以使它更类似于 Java 的 JavaDoc,这并不难阅读。
【问题讨论】:
标签: c# visual-studio intellisense