反射 先加载 然后 去创建
var rs1 = Assembly.LoadFrom("WindowsFormsApp1").GetType("WindowsFormsApp1.Form2"); var rs = Assembly.Load("WindowsFormsApp1").GetType("WindowsFormsApp1.Form2"); Form form = (Form)Activator.CreateInstance(rs); form.Show();
万物皆对象 然后在创建
var rs1 = Assembly.LoadFrom("WindowsFormsApp1").GetType("WindowsFormsApp1.Form2"); var rs = Assembly.Load("WindowsFormsApp1").GetType("WindowsFormsApp1.Form2"); Form form = (Form)Activator.CreateInstance(rs); form.Show();
万物皆对象 然后在创建