/// <summary>
/// 申明一个委托
/// </summary>
public delegate void ClickDel();
/// <summary>
/// 定义一个事件
/// </summary>
public event ClickDel ClickEnent;
static void Main(string[] args)
{
Program p = new Program();
p.ClickEnent += new ClickDel(Click);//点阅事件
p.ClickEnent();
Console.WriteLine("Hello World!");
}
public static void Click()
{
Console.WriteLine("单击事件");
}
标签:ClickEnent,Console,委托,ClickDel,c#,void,事件,public From: https://www.cnblogs.com/kkds/p/16755840.html