反射动态调用WinForm窗口

代码如下:
Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
Type type 
= assembly.GetType("CoalTraffic.Report." + strReportArea + "LoadWeightPrint");
object obj = Activator.CreateInstance(type, strWeightCode,true); Form formToShow = (Form)obj; formToShow.ShowDialog();
原文地址:https://www.cnblogs.com/zhangpengshou/p/1634115.html