How to get Intellisense to display the meaning of an enum value

I'm wanting to know to get Intellisense in Visual Studio 2005 to display the meaning of individual enum values for a VB.NET project. This already happens for enums that are a part of the .NET library.

Is this possible? If so, how would I need to comment my enums to get this to happen?

15
задан JL2210 6 October 2019 в 15:43
поделиться

2 ответа

В VS 2008 просто используйте стандартный синтаксис комментариев XML. Я предполагаю (но не могу проверить), что в VS 2005 то же самое?

    ''' <summary>
    ''' Overall description
    ''' </summary>
    Public Enum Foo AS Integer
        ''' <summary>
        ''' Specific value description
        ''' </summary>
        First,
        ''' <summary>
        ''' etc.
        ''' </summary>
        Second
    End Enum
16
ответ дан 1 December 2019 в 03:13
поделиться

В C# это делается следующим образом:

enum Test
{
    /// <summary>
    /// The first value.
    /// </summary>
    Val1,
    /// <summary>
    /// The second value
    /// </summary>
    Val2,
    /// <summary>
    /// The third value
    /// </summary>
    Val3
}

Итак, в VB вы просто добавляете сводку XML-комментария над значением перечисления.

7
ответ дан 1 December 2019 в 03:13
поделиться
Другие вопросы по тегам:

Похожие вопросы: