A
Academia
I create a form
Public Class MyTool
Inherits MyForm
....
which uses:
Public MustInherit Class MyForm
Inherits Form
....
The reason for the MustInherit is that the MyForm contains:
Protected Friend MustOverride Sub SetThis()
And get the error:
The designer must create an instance of type 'Test.Lib.MyForm' but it cannot
because the type is declared as abstract.
If I change to an Overridable sub and remove the MustInherit it works OK.
I prefer the MustOverride because then I can't forget to override it when I
use MyForm.
Can you advise or shed some light on this?
Thanks
Public Class MyTool
Inherits MyForm
....
which uses:
Public MustInherit Class MyForm
Inherits Form
....
The reason for the MustInherit is that the MyForm contains:
Protected Friend MustOverride Sub SetThis()
And get the error:
The designer must create an instance of type 'Test.Lib.MyForm' but it cannot
because the type is declared as abstract.
If I change to an Overridable sub and remove the MustInherit it works OK.
I prefer the MustOverride because then I can't forget to override it when I
use MyForm.
Can you advise or shed some light on this?
Thanks