I'm doing an applicaton that has a main form, configuration form, configuration class and two (for lack of better terms) main classes. The main form starts. Before it is displayed, the configuration form displays as a dialog form. It is the interface to the configuration class. When the configuration form is terminated with 'OK', the main form displays. Based on the configuration information, the main form must have a reference to either main1 or main2 class. The main form will reference either of these two classes as main(not referring to main method() ). How do I do this?