When DIM a CLASS update properties values


I have a class named sysconfig. This class have string properties with all the parameter needed in my webapp. This parameter are storage in a mysql database.
The class also have a method named update. When call this method get the info from the database and fill the string properties values of the class.


When i DIM the class after that i need to call the update method like this

dim s as new sysconfig

My question is, how i can dim the class without then need run the update method? is posible to put something in the class that call the method automatic when i dim the class.?

Add a Constructor method to your class. The Constructor is called automatically when you use the New keyword:

Sub Constructor()
End Sub

That work!!!, thank you very much.