What is the best practice for makeoverride / overridable methods in an abstract class that return nothing. The particular class that this abstract class inherits from can decide whether it requires functionality and can cancel as needed.
Now I understand that this is a function of the interface, but in the abstract class there is a lot of plumbing code that had to be “unclosed” to implement this.
My question is is it a bad design to have these methods in your project?
Example 1 The Concrete class requires implementation, but is forced to override this method.
(annotation)
Friend MustOverride Function GetTitle() As String
(concrete)
Friend Overrides Function GetTitle() As String Return nothing End Function
Example 2 The Concrete class can override this method if required, but the abstract class contains a method that returns nothing.
(annotation)
Friend Overridable Function GetTitle() As String Return nothing End Function
(concrete)
Friend Overrides Function GetTitle() As String Return "Title" End Function
source share