using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DelegateAndEventDemo { public delegate void ClickEventHandler(object sender, EventArgs e); //声明一个代理 public class MyButton { public event ClickEventHandler ClickEvent; //声明一个事件