object procedures
-
In Visual Basic 6 you could add descriptive text to your object procedures by using the “Procedure Attributes” dialog. Descriptive text would then appear in the Object Browser. How can I add descriptive text to my object procedures (methods) in VB.Net and have it appear in the Object Browser and in the Intellisense Pop-Ups. (Like different text for overridden methods.) I suspect this is done using attributes but 4 ½ hours in the MSDN has only served to confuse the issue even further. If possible, please include some source code showing how it is done. Thanks to anyone that can provide a solution to this problem.
-
In Visual Basic 6 you could add descriptive text to your object procedures by using the “Procedure Attributes” dialog. Descriptive text would then appear in the Object Browser. How can I add descriptive text to my object procedures (methods) in VB.Net and have it appear in the Object Browser and in the Intellisense Pop-Ups. (Like different text for overridden methods.) I suspect this is done using attributes but 4 ½ hours in the MSDN has only served to confuse the issue even further. If possible, please include some source code showing how it is done. Thanks to anyone that can provide a solution to this problem.
The VB compiler natively supports adding descriptions using the Description attribute. These will appear in the Object Browser and below the Properties box in the bottom right corner of the IDE, but will NOT show up in Intellisense. For this, you have to use a plug-in like VBCommenter. You can find that here[^]. An example of the Description attribute:
<Category("Appearance"), \_ Description("Set the number of LEDs to display."), \_ DefaultValue(4), \_ Bindable(True)> \_ Public Property SizeInBits() As Integer Get Return m\_SizeInBits End Get Set(ByVal NewValue As Integer) If NewValue < 1 Or NewValue > 32 Then Throw New ArgumentOutOfRangeException("SizeInBits", "Value must be between 1 and 32.") Else m\_SizeInBits = NewValue OnSizeInBitsChanged(EventArgs.Empty)
If m_Value >= (2 ^ m_SizeInBits) Then
m_Value = 0
OnValueChanged(EventArgs.Empty)
End If
End If
End Set
End PropertyRageInTheMachine9532