vb6 migration - Multiple constructors in VB6? -


What are the many constructors in vb6? I am asking because I am looking to start the class, but I do not know if I can stick to 0 or more parameters in a constructor or if there is a class_inlizing constructor and it can accept many parameters. Its illusion mainly because I am very familiar with C #, as far as the classes are concerned as far as vb6 is going.

Class_Initialize is an event that is always possible, like the example of a class is instant, it is not actually equal to the C # constructor

For example, Code> Class_Initialize is built as a personal , while the C # class with a private manufacturer can not be done immediately.

When you can change the VB6 class_transfer from event to private to public object, not too many points It will be: Because this event can be implemented in any way instantly, why would you want to call it a second time clearly? (If you have done it would be better to have a public method, which is called Class_Initialize event.)

You can not add parameters to VB6 Class_Initialize Event, even those with optional Attempts to do this will cause a compilation error.

The best you can do is to have your own get started with the parameters as required, which must be explicitly stated, and until get started < To ensure that the / code> method is not implemented, an internal flag is set to be initiated state variable. Apart from this, consider a 'factory' approach: the class that is introduced by the factory with the public knit cutables with the start date and is suitable for the callers Initially the service is done.

Comments