i have a class like this
Public Class A
Public Overridable Sub F()
End Sub
Public Overridable Sub F(ByVal x As Integer)
End Sub
End Class
i want to inherit a class from Class A like this
Public Class B
Inherits A
Public Overrides Sub F(ByVal x As Integer)
End Sub
End Class
but i get a compile error that says
sub 'F' cannot be declared 'Overrides' because it does not override a sub in a base class.
when i rearrange Class A and change the location of the two overloaded methods it will be ok:
Public Class A
Public Overridable Sub F(ByVal x As Integer)
End Sub
Public Overridable Sub F()
End Sub
End Class
can anybody tell me why it is so?
thankX
