myButton.Click+=new  System.EventHandler(Btn_Click);
就可以啊!!还是你有其它意图?
说清楚点

解决方案 »

  1.   


    委托,DELEGATE可以呀!
      

  2.   

    如果你想在Add()方法中调用Btn_Click,方法是:
    [VB]
    AddHandler myButton.Click, AddressOf Me.Btn_Click[C#]
    myButton.Click += new System.EventHandler(this.Btn_Click);
      

  3.   

    这问题已经解决啦!http://www.csdn.net/Expert/TopicView1.asp?id=555264
    谢谢大家!回复人: chechy(我爱洁洁) (  ) 信誉:110  2002-3-5  10:36:48  得分:20  
     
     
      作为参数,似乎只能这样:
      public  void  Add(EventHandler  a)
      {
        button2.Click  +=  a;
      }
      
        Add(new  EventHandler(button3_Click));
     
      

  4.   

    delegate void EventFunction(object sender,EventArgs e);
    public  void  add(EventFunction function)
      {
            Button  myButton=new  Button();
            myButton.Name="asdf";
            myButton.Location=new  Point(20,20);
            myButton.Click+=new  System.EventHandler(function);
      }
      
      public  void  Btn_Click(object  sender,System.EventArgs  e)
      {
            ....
      }
    EventFunction eventFunction+=new EventFunction(Btn_Click);
    add(eventFunction)