动态事件绑定
EventInfo evt = this.button1.GetType().GetEvent("Click", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
Assembly sys = Assembly.LoadFile(Application.StartupPath + "\\ClassLibrary1.dll");
Type t = sys.GetType("ClassLibrary1.Class1");
timer = Activator.CreateInstance(t);
MethodInfo info = t.GetMethod("button1_Click");
Delegate d = Delegate.CreateDelegate(evt.EventHandlerType, info);//报:绑定到目标方法时出错。 evt.AddEventHandler(this.button1, d);
这是什么原因,请指点谢谢