I am working through a VB.Net book ( as you do ) and I have come across a bit of code that seems a bit redundant to me.
the book gives no explanation why it is there.
A child class inherits a parent class and in the child class with the following code:-
Code:
Public Class LineItemList
Inherits list(Of lineItem)
Public Sub New()
MyBase.New
End Sub
Default Public Overloads readOnly Property item(ByVal I As Integer) As Line Item
. . .
. . .
End Propery
etc.
The New constructor is defined here to be exactly the same as the parent constructor
but if they are the same, why is there a need to code it at all in the child class?
The Public Sub New() definition in this class seems unnecessary to me.
Am I missing something?
Dazed and confused.
Remember.. 'Depression is just anger without enthusiasum'.