Class inheritance problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

VS 2003

Class C inherits Class B which inherits Class A.

Class A contains a protected overridale sub MySub.
Class B overrides MySub.

MySub does not appear in the editor's Overrides drop down list when editing
Class C. If I type the sub manually, it works Ok.

How do I get the sub to be displayed i the overrides list?
 
* "=?Utf-8?B?TWlrZUg=?= said:
VS 2003

Class C inherits Class B which inherits Class A.

Class A contains a protected overridale sub MySub.
Class B overrides MySub.

MySub does not appear in the editor's Overrides drop down list when editing
Class C. If I type the sub manually, it works Ok.

How do I get the sub to be displayed i the overrides list?

I currently do not have VS.NET 2003 at hand, but it works fine in VS.NET
2002.
 
I'm using 2003, works ok for me 2



--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 
MikeH,
How do I get the sub to be displayed i the overrides list?
As the others have stated, I tried the following in VB.NET 2003, I am unable
to recreate the problem. (MySub appears for ClassC's overrides).

Can you give more details, such as:

- Are all three in the same?
- Is ClassA the root class or does it inherit from something else?
- Are there any overloads, such as MySub() & MySub(Integer)?
- Anything else that may be unique in what you are doing?

Option Strict On
Option Explicit On

Public Class ClassA

Protected Overridable Sub MySub()

End Sub

End Class

Public Class ClassB
Inherits ClassA

Protected Overrides Sub MySub()

End Sub

End Class

Public Class ClassC
Inherits ClassB

End Class

Hope this helps
Jay
 
Back
Top