Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Constructor

Status
Not open for further replies.

drkestrel

MIS
Sep 25, 2000
439
GB
If I do not need to have a constructor that initialies any instance variables do I still to do something like the following or would it be 'implicit' as it would do in Java?
Code:
    Public Sub New()
        MyBase.New()
    End Sub

Anyway, do I need the
Code:
MyBase.New()
or is that automatic?
 
drkestrel,

I believe it is implicit because I have not included the line in the New constructor in Classes and all seems to work well.
 
I believe the Mybase.New is only needed for objects Inheriting a base class. Mybase being the base class you are inheriting. So if you aren't using Inheritance, then you shouldn't need it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top