M
MrAnon
I rarely have the pleasure of working in VB.NET so forgive my
ignorance, but what I'm trying to do is very easy in C# and I'm
wondering whether a similar thing is possible in VB.NET.
I have a class MySuperForm
Public Class MySuperForm
Inherits Form '' Yup, System.Windows.Forms.Form
Implements IMySuperForm
End Class
Public Interface IMySuperForm
Sub Show()
End Interface
In c# that would compile, but in VB.NET I need to declare which method
implements Show() but I can't because the method doesn't belong to me.
It belongs to Form.
The only workaround I have found is to shadow the Sub
Public Class MySuperForm
Inherits Form '' Yup, System.Windows.Forms.Form
Implements IMySuperForm
Public Shadows Sub Show() Implements IMySuperForm.Show
MyBase.Show()
End Sub
End Class
Is this the only way to achieve this?
ignorance, but what I'm trying to do is very easy in C# and I'm
wondering whether a similar thing is possible in VB.NET.
I have a class MySuperForm
Public Class MySuperForm
Inherits Form '' Yup, System.Windows.Forms.Form
Implements IMySuperForm
End Class
Public Interface IMySuperForm
Sub Show()
End Interface
In c# that would compile, but in VB.NET I need to declare which method
implements Show() but I can't because the method doesn't belong to me.
It belongs to Form.
The only workaround I have found is to shadow the Sub
Public Class MySuperForm
Inherits Form '' Yup, System.Windows.Forms.Form
Implements IMySuperForm
Public Shadows Sub Show() Implements IMySuperForm.Show
MyBase.Show()
End Sub
End Class
Is this the only way to achieve this?