关于反射的问题
Assembly a = Assembly.LoadFrom(@"E:\TestColumnDragDataGrid.exe");
object o = a.CreateInstance("TestColumnDragDataGrid.ClassB");
上面这一句是正确的,但下面这一句就不正确,为什么?
Assembly ass = Assembly.LoadFrom(@"E:\System.Windows.Forms.dll");
object examObject = ass.CreateInstance("System.Windows.Forms.TextBox");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System.Windows.Forms.Control ct = (System.Windows.Forms.Control)examObject;
实际上~~~这一句就已经出错,但没有提示
请大侠解说一下: