本文介绍了如何添加鼠标悬停汇总的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我几乎可以肯定这将是一个非常简单的答案,但我似乎无法在任何地方找到它。我们都知道,当你将鼠标悬停的东西(比如一个字符串)小小的总结弹出(如果启用)。对于一个字符串,它说:

I'm almost certain this is going to be a very simple answer but I can't seem to find it anywhere. We all know when you hover your mouse over something (like a string) a little summary pops up (if its enabled). For a string, it says:

类System.String

表示文本。作为一系列Unicode字符

Represents text as a series of Unicode characters.

当我鼠标的的我的的类,它只是一个人说:

When I mouse over one of my classes, it simply says:

类Namespace.Widget

我已经试过两个明显的例子,我发现:

I've tried the two obvious examples I've found:

/// <summary>
/// This summary does not work, I know it's for html documenting tools but thought it was worth a shot.
/// </summary>

// Summary:
//     This is what is in some of the base libraries, and does not work as well.



那么,如何添加一个汇总到鼠标悬停弹出??

So, how do I add a summary to the mouse-over pop-up??

推荐答案

我不明白为什么你的第一次尝试是行不通的。这是<总结> 注释标记它提供的'提示'你在谈论...

I don't see why your first attempt wouldn't work. It's the <summary> comment tag which supplies the 'tooltip' you're talking about...

/// <summary>
/// This text should automatically show up as the summary when hovering over
/// an instance of this class in VS
/// </summary>
public class MyClass
{
    public MyClass() {}
}

public class MyClass2
{
    public MyClass()
    {
        //hovering over 'something' below in VS should provide the summary tooltip...
        MyClass something = new MyClass();
    }
}

如果你想帮助自动化你的一些评论,试着免费。通过最好的免费插件VS远的..

If you want help automating some of your commenting, try the free GhostDoc. By far one of the best free VS addons..

这篇关于如何添加鼠标悬停汇总的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 23:35