Take the following example: Form1, Form2, Form3 ...... Inherited from Form, you can use Form f = new Form1 (); and so on to create an instance of the Form subclass. If there are too many subclasses, you can create an instance by passing a parameter, such as the subclass class name, how can this problem be solved? Method 1: Use the reflection string str = "namespace. Form1 (Form2 ......)"; Type t = Type. getType (str); Form f = Activator. createInstance (t); in this way, you can implement what you want. str is a variable. Of course, you must add namespace method 2 when passing parameters: use generic T CreateForem <T> () where T: Form, new () // here new is used as a constraint, see http://msdn.microsoft.com/zh-cn/library/51y09td4.aspx {return new T () ;}then you can call Form f = CreateForm <parameter> (); // The parameters are Form1, Form2, and Form3.