开发者

Intellisense for member override in VB.Net 2008 Express Edition

If I override a member (e.g AutoSize in the Button Class), then the intellisense no longer appears in the editor, forcing me to re-decorate the property.

Is there an option somewhere that I need to check?

ETA: Here's a code sample:

Public Class MyButton
    Inherits Button

    Public Overrides Property AutoSize() As Boolean
        Get
            Return MyBase.Auto开发者_如何转开发Size
        End Get
        Set(ByVal value As Boolean)
            MyBase.AutoSize = value
        End Set
    End Property

End Class

If I then type:

Dim b as New MyButton
b.AutoSize ...

The intellisense explaining the AutoSize property doesn't appear.


Whether a property is visible in IntelliSense is controlled by the [EditorBrowsable] attribute. VB.NET is a bit special because it hides EditorBrowsableState.Advanced by default.

None of this would apply to an override to Button.AutoSize, it is always visible. Maybe you can give a better example, a code snippet is always good.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜