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?
В 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
В C# это делается следующим образом:
enum Test
{
/// <summary>
/// The first value.
/// </summary>
Val1,
/// <summary>
/// The second value
/// </summary>
Val2,
/// <summary>
/// The third value
/// </summary>
Val3
}
Итак, в VB вы просто добавляете сводку XML-комментария над значением перечисления.