tryType t = Type.GetType("test.Form1");
//构造参数
object[] args = new object[2]{yourparam1,yourparam2};object obj = System.Activator.CreateInstance(t,args);Form showForm = (Form)obj;
showForm.Show();
//构造参数
object[] args = new object[2]{yourparam1,yourparam2};object obj = System.Activator.CreateInstance(t,args);Form showForm = (Form)obj;
showForm.Show();
参数是一个object[]数组
如上面写的那样
当然还有LoadFile等,看你怎么用了:)
不过好像用这个dll里的类来CreateInstance是必须要先装载这个dll的
---这个意思大概是说,已经添加了引用吧
如果没有添加这个DLL的引用,可以
Assembly a = Assembly.LoadFile("test.dll");
Type t = a.GetType("test.Form1");
//构造参数
object[] args = new object[2]{yourparam1,yourparam2};object obj = System.Activator.CreateInstance(t,args);Form showForm = (Form)obj;
showForm.Show();
Version, Culture, PublicKeyToken
Private Ini1 As Ini1
-----------------------------------------------------
If Ini1 Is Nothing OrElse Ini1.IsDisposed Then
Ini1 = New ini1
Ini1.MdiParent = Me
Ini1.Show()
Me.Refresh()
Else
Ini1.Activate()
End If
------------------------------------------------------
我要对-------内的内容进行打包,打包就必须要传值,但传的值为Ini1(为Form)和New ini1(这个为Class)
这个包该怎么打呢?